| // This file was auto-generated by the veyron vdl tool. |
| // Source: wire.vdl |
| |
| package server |
| |
| import ( |
| // VDL system imports |
| "io" |
| "v.io/v23" |
| "v.io/v23/context" |
| "v.io/v23/ipc" |
| |
| // VDL user imports |
| "v.io/v23/security" |
| ) |
| |
| // AgentClientMethods is the client interface |
| // containing Agent methods. |
| type AgentClientMethods interface { |
| Bless(ctx *context.T, key []byte, wit security.WireBlessings, extension string, caveat security.Caveat, additionalCaveats []security.Caveat, opts ...ipc.CallOpt) (security.WireBlessings, error) |
| BlessSelf(ctx *context.T, name string, caveats []security.Caveat, opts ...ipc.CallOpt) (security.WireBlessings, error) |
| Sign(ctx *context.T, message []byte, opts ...ipc.CallOpt) (security.Signature, error) |
| MintDischarge(ctx *context.T, forCaveat security.Caveat, caveatOnDischarge security.Caveat, additionalCaveatsOnDischarge []security.Caveat, opts ...ipc.CallOpt) (security.WireDischarge, error) |
| PublicKey(*context.T, ...ipc.CallOpt) ([]byte, error) |
| BlessingsByName(ctx *context.T, name security.BlessingPattern, opts ...ipc.CallOpt) ([]security.WireBlessings, error) |
| BlessingsInfo(ctx *context.T, blessings security.WireBlessings, opts ...ipc.CallOpt) (map[string][]security.Caveat, error) |
| AddToRoots(ctx *context.T, blessing security.WireBlessings, opts ...ipc.CallOpt) error |
| BlessingStoreSet(ctx *context.T, blessings security.WireBlessings, forPeers security.BlessingPattern, opts ...ipc.CallOpt) (security.WireBlessings, error) |
| BlessingStoreForPeer(ctx *context.T, peerBlessings []string, opts ...ipc.CallOpt) (security.WireBlessings, error) |
| BlessingStoreSetDefault(ctx *context.T, blessings security.WireBlessings, opts ...ipc.CallOpt) error |
| BlessingStoreDefault(*context.T, ...ipc.CallOpt) (security.WireBlessings, error) |
| BlessingStorePeerBlessings(*context.T, ...ipc.CallOpt) (map[security.BlessingPattern]security.WireBlessings, error) |
| BlessingStoreDebugString(*context.T, ...ipc.CallOpt) (string, error) |
| BlessingRootsAdd(ctx *context.T, root []byte, pattern security.BlessingPattern, opts ...ipc.CallOpt) error |
| BlessingRootsRecognized(ctx *context.T, root []byte, blessing string, opts ...ipc.CallOpt) error |
| BlessingRootsDebugString(*context.T, ...ipc.CallOpt) (string, error) |
| // Clients using caching should call NotifyWhenChanged upon connecting to |
| // the server. The server will stream back values whenever the client should |
| // flush the cache. The streamed value is arbitrary, simply flush whenever |
| // recieving a new item. |
| NotifyWhenChanged(*context.T, ...ipc.CallOpt) (AgentNotifyWhenChangedCall, error) |
| } |
| |
| // AgentClientStub adds universal methods to AgentClientMethods. |
| type AgentClientStub interface { |
| AgentClientMethods |
| ipc.UniversalServiceMethods |
| } |
| |
| // AgentClient returns a client stub for Agent. |
| func AgentClient(name string, opts ...ipc.BindOpt) AgentClientStub { |
| var client ipc.Client |
| for _, opt := range opts { |
| if clientOpt, ok := opt.(ipc.Client); ok { |
| client = clientOpt |
| } |
| } |
| return implAgentClientStub{name, client} |
| } |
| |
| type implAgentClientStub struct { |
| name string |
| client ipc.Client |
| } |
| |
| func (c implAgentClientStub) c(ctx *context.T) ipc.Client { |
| if c.client != nil { |
| return c.client |
| } |
| return v23.GetClient(ctx) |
| } |
| |
| func (c implAgentClientStub) Bless(ctx *context.T, i0 []byte, i1 security.WireBlessings, i2 string, i3 security.Caveat, i4 []security.Caveat, opts ...ipc.CallOpt) (o0 security.WireBlessings, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "Bless", []interface{}{i0, i1, i2, i3, i4}, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) BlessSelf(ctx *context.T, i0 string, i1 []security.Caveat, opts ...ipc.CallOpt) (o0 security.WireBlessings, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessSelf", []interface{}{i0, i1}, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) Sign(ctx *context.T, i0 []byte, opts ...ipc.CallOpt) (o0 security.Signature, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "Sign", []interface{}{i0}, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) MintDischarge(ctx *context.T, i0 security.Caveat, i1 security.Caveat, i2 []security.Caveat, opts ...ipc.CallOpt) (o0 security.WireDischarge, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "MintDischarge", []interface{}{i0, i1, i2}, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) PublicKey(ctx *context.T, opts ...ipc.CallOpt) (o0 []byte, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "PublicKey", nil, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingsByName(ctx *context.T, i0 security.BlessingPattern, opts ...ipc.CallOpt) (o0 []security.WireBlessings, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingsByName", []interface{}{i0}, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingsInfo(ctx *context.T, i0 security.WireBlessings, opts ...ipc.CallOpt) (o0 map[string][]security.Caveat, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingsInfo", []interface{}{i0}, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) AddToRoots(ctx *context.T, i0 security.WireBlessings, opts ...ipc.CallOpt) (err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "AddToRoots", []interface{}{i0}, opts...); err != nil { |
| return |
| } |
| err = call.Finish() |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingStoreSet(ctx *context.T, i0 security.WireBlessings, i1 security.BlessingPattern, opts ...ipc.CallOpt) (o0 security.WireBlessings, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingStoreSet", []interface{}{i0, i1}, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingStoreForPeer(ctx *context.T, i0 []string, opts ...ipc.CallOpt) (o0 security.WireBlessings, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingStoreForPeer", []interface{}{i0}, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingStoreSetDefault(ctx *context.T, i0 security.WireBlessings, opts ...ipc.CallOpt) (err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingStoreSetDefault", []interface{}{i0}, opts...); err != nil { |
| return |
| } |
| err = call.Finish() |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingStoreDefault(ctx *context.T, opts ...ipc.CallOpt) (o0 security.WireBlessings, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingStoreDefault", nil, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingStorePeerBlessings(ctx *context.T, opts ...ipc.CallOpt) (o0 map[security.BlessingPattern]security.WireBlessings, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingStorePeerBlessings", nil, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingStoreDebugString(ctx *context.T, opts ...ipc.CallOpt) (o0 string, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingStoreDebugString", nil, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingRootsAdd(ctx *context.T, i0 []byte, i1 security.BlessingPattern, opts ...ipc.CallOpt) (err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingRootsAdd", []interface{}{i0, i1}, opts...); err != nil { |
| return |
| } |
| err = call.Finish() |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingRootsRecognized(ctx *context.T, i0 []byte, i1 string, opts ...ipc.CallOpt) (err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingRootsRecognized", []interface{}{i0, i1}, opts...); err != nil { |
| return |
| } |
| err = call.Finish() |
| return |
| } |
| |
| func (c implAgentClientStub) BlessingRootsDebugString(ctx *context.T, opts ...ipc.CallOpt) (o0 string, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "BlessingRootsDebugString", nil, opts...); err != nil { |
| return |
| } |
| err = call.Finish(&o0) |
| return |
| } |
| |
| func (c implAgentClientStub) NotifyWhenChanged(ctx *context.T, opts ...ipc.CallOpt) (ocall AgentNotifyWhenChangedCall, err error) { |
| var call ipc.Call |
| if call, err = c.c(ctx).StartCall(ctx, c.name, "NotifyWhenChanged", nil, opts...); err != nil { |
| return |
| } |
| ocall = &implAgentNotifyWhenChangedCall{Call: call} |
| return |
| } |
| |
| // AgentNotifyWhenChangedClientStream is the client stream for Agent.NotifyWhenChanged. |
| type AgentNotifyWhenChangedClientStream interface { |
| // RecvStream returns the receiver side of the Agent.NotifyWhenChanged client stream. |
| RecvStream() interface { |
| // Advance stages an item so that it may be retrieved via Value. Returns |
| // true iff there is an item to retrieve. Advance must be called before |
| // Value is called. May block if an item is not available. |
| Advance() bool |
| // Value returns the item that was staged by Advance. May panic if Advance |
| // returned false or was not called. Never blocks. |
| Value() bool |
| // Err returns any error encountered by Advance. Never blocks. |
| Err() error |
| } |
| } |
| |
| // AgentNotifyWhenChangedCall represents the call returned from Agent.NotifyWhenChanged. |
| type AgentNotifyWhenChangedCall interface { |
| AgentNotifyWhenChangedClientStream |
| // Finish blocks until the server is done, and returns the positional return |
| // values for call. |
| // |
| // Finish returns immediately if the call has been canceled; depending on the |
| // timing the output could either be an error signaling cancelation, or the |
| // valid positional return values from the server. |
| // |
| // Calling Finish is mandatory for releasing stream resources, unless the call |
| // has been canceled or any of the other methods return an error. Finish should |
| // be called at most once. |
| Finish() error |
| } |
| |
| type implAgentNotifyWhenChangedCall struct { |
| ipc.Call |
| valRecv bool |
| errRecv error |
| } |
| |
| func (c *implAgentNotifyWhenChangedCall) RecvStream() interface { |
| Advance() bool |
| Value() bool |
| Err() error |
| } { |
| return implAgentNotifyWhenChangedCallRecv{c} |
| } |
| |
| type implAgentNotifyWhenChangedCallRecv struct { |
| c *implAgentNotifyWhenChangedCall |
| } |
| |
| func (c implAgentNotifyWhenChangedCallRecv) Advance() bool { |
| c.c.errRecv = c.c.Recv(&c.c.valRecv) |
| return c.c.errRecv == nil |
| } |
| func (c implAgentNotifyWhenChangedCallRecv) Value() bool { |
| return c.c.valRecv |
| } |
| func (c implAgentNotifyWhenChangedCallRecv) Err() error { |
| if c.c.errRecv == io.EOF { |
| return nil |
| } |
| return c.c.errRecv |
| } |
| func (c *implAgentNotifyWhenChangedCall) Finish() (err error) { |
| err = c.Call.Finish() |
| return |
| } |
| |
| // AgentServerMethods is the interface a server writer |
| // implements for Agent. |
| type AgentServerMethods interface { |
| Bless(ctx ipc.ServerContext, key []byte, wit security.WireBlessings, extension string, caveat security.Caveat, additionalCaveats []security.Caveat) (security.WireBlessings, error) |
| BlessSelf(ctx ipc.ServerContext, name string, caveats []security.Caveat) (security.WireBlessings, error) |
| Sign(ctx ipc.ServerContext, message []byte) (security.Signature, error) |
| MintDischarge(ctx ipc.ServerContext, forCaveat security.Caveat, caveatOnDischarge security.Caveat, additionalCaveatsOnDischarge []security.Caveat) (security.WireDischarge, error) |
| PublicKey(ipc.ServerContext) ([]byte, error) |
| BlessingsByName(ctx ipc.ServerContext, name security.BlessingPattern) ([]security.WireBlessings, error) |
| BlessingsInfo(ctx ipc.ServerContext, blessings security.WireBlessings) (map[string][]security.Caveat, error) |
| AddToRoots(ctx ipc.ServerContext, blessing security.WireBlessings) error |
| BlessingStoreSet(ctx ipc.ServerContext, blessings security.WireBlessings, forPeers security.BlessingPattern) (security.WireBlessings, error) |
| BlessingStoreForPeer(ctx ipc.ServerContext, peerBlessings []string) (security.WireBlessings, error) |
| BlessingStoreSetDefault(ctx ipc.ServerContext, blessings security.WireBlessings) error |
| BlessingStoreDefault(ipc.ServerContext) (security.WireBlessings, error) |
| BlessingStorePeerBlessings(ipc.ServerContext) (map[security.BlessingPattern]security.WireBlessings, error) |
| BlessingStoreDebugString(ipc.ServerContext) (string, error) |
| BlessingRootsAdd(ctx ipc.ServerContext, root []byte, pattern security.BlessingPattern) error |
| BlessingRootsRecognized(ctx ipc.ServerContext, root []byte, blessing string) error |
| BlessingRootsDebugString(ipc.ServerContext) (string, error) |
| // Clients using caching should call NotifyWhenChanged upon connecting to |
| // the server. The server will stream back values whenever the client should |
| // flush the cache. The streamed value is arbitrary, simply flush whenever |
| // recieving a new item. |
| NotifyWhenChanged(AgentNotifyWhenChangedContext) error |
| } |
| |
| // AgentServerStubMethods is the server interface containing |
| // Agent methods, as expected by ipc.Server. |
| // The only difference between this interface and AgentServerMethods |
| // is the streaming methods. |
| type AgentServerStubMethods interface { |
| Bless(ctx ipc.ServerContext, key []byte, wit security.WireBlessings, extension string, caveat security.Caveat, additionalCaveats []security.Caveat) (security.WireBlessings, error) |
| BlessSelf(ctx ipc.ServerContext, name string, caveats []security.Caveat) (security.WireBlessings, error) |
| Sign(ctx ipc.ServerContext, message []byte) (security.Signature, error) |
| MintDischarge(ctx ipc.ServerContext, forCaveat security.Caveat, caveatOnDischarge security.Caveat, additionalCaveatsOnDischarge []security.Caveat) (security.WireDischarge, error) |
| PublicKey(ipc.ServerContext) ([]byte, error) |
| BlessingsByName(ctx ipc.ServerContext, name security.BlessingPattern) ([]security.WireBlessings, error) |
| BlessingsInfo(ctx ipc.ServerContext, blessings security.WireBlessings) (map[string][]security.Caveat, error) |
| AddToRoots(ctx ipc.ServerContext, blessing security.WireBlessings) error |
| BlessingStoreSet(ctx ipc.ServerContext, blessings security.WireBlessings, forPeers security.BlessingPattern) (security.WireBlessings, error) |
| BlessingStoreForPeer(ctx ipc.ServerContext, peerBlessings []string) (security.WireBlessings, error) |
| BlessingStoreSetDefault(ctx ipc.ServerContext, blessings security.WireBlessings) error |
| BlessingStoreDefault(ipc.ServerContext) (security.WireBlessings, error) |
| BlessingStorePeerBlessings(ipc.ServerContext) (map[security.BlessingPattern]security.WireBlessings, error) |
| BlessingStoreDebugString(ipc.ServerContext) (string, error) |
| BlessingRootsAdd(ctx ipc.ServerContext, root []byte, pattern security.BlessingPattern) error |
| BlessingRootsRecognized(ctx ipc.ServerContext, root []byte, blessing string) error |
| BlessingRootsDebugString(ipc.ServerContext) (string, error) |
| // Clients using caching should call NotifyWhenChanged upon connecting to |
| // the server. The server will stream back values whenever the client should |
| // flush the cache. The streamed value is arbitrary, simply flush whenever |
| // recieving a new item. |
| NotifyWhenChanged(*AgentNotifyWhenChangedContextStub) error |
| } |
| |
| // AgentServerStub adds universal methods to AgentServerStubMethods. |
| type AgentServerStub interface { |
| AgentServerStubMethods |
| // Describe the Agent interfaces. |
| Describe__() []ipc.InterfaceDesc |
| } |
| |
| // AgentServer returns a server stub for Agent. |
| // It converts an implementation of AgentServerMethods into |
| // an object that may be used by ipc.Server. |
| func AgentServer(impl AgentServerMethods) AgentServerStub { |
| stub := implAgentServerStub{ |
| impl: impl, |
| } |
| // Initialize GlobState; always check the stub itself first, to handle the |
| // case where the user has the Glob method defined in their VDL source. |
| if gs := ipc.NewGlobState(stub); gs != nil { |
| stub.gs = gs |
| } else if gs := ipc.NewGlobState(impl); gs != nil { |
| stub.gs = gs |
| } |
| return stub |
| } |
| |
| type implAgentServerStub struct { |
| impl AgentServerMethods |
| gs *ipc.GlobState |
| } |
| |
| func (s implAgentServerStub) Bless(ctx ipc.ServerContext, i0 []byte, i1 security.WireBlessings, i2 string, i3 security.Caveat, i4 []security.Caveat) (security.WireBlessings, error) { |
| return s.impl.Bless(ctx, i0, i1, i2, i3, i4) |
| } |
| |
| func (s implAgentServerStub) BlessSelf(ctx ipc.ServerContext, i0 string, i1 []security.Caveat) (security.WireBlessings, error) { |
| return s.impl.BlessSelf(ctx, i0, i1) |
| } |
| |
| func (s implAgentServerStub) Sign(ctx ipc.ServerContext, i0 []byte) (security.Signature, error) { |
| return s.impl.Sign(ctx, i0) |
| } |
| |
| func (s implAgentServerStub) MintDischarge(ctx ipc.ServerContext, i0 security.Caveat, i1 security.Caveat, i2 []security.Caveat) (security.WireDischarge, error) { |
| return s.impl.MintDischarge(ctx, i0, i1, i2) |
| } |
| |
| func (s implAgentServerStub) PublicKey(ctx ipc.ServerContext) ([]byte, error) { |
| return s.impl.PublicKey(ctx) |
| } |
| |
| func (s implAgentServerStub) BlessingsByName(ctx ipc.ServerContext, i0 security.BlessingPattern) ([]security.WireBlessings, error) { |
| return s.impl.BlessingsByName(ctx, i0) |
| } |
| |
| func (s implAgentServerStub) BlessingsInfo(ctx ipc.ServerContext, i0 security.WireBlessings) (map[string][]security.Caveat, error) { |
| return s.impl.BlessingsInfo(ctx, i0) |
| } |
| |
| func (s implAgentServerStub) AddToRoots(ctx ipc.ServerContext, i0 security.WireBlessings) error { |
| return s.impl.AddToRoots(ctx, i0) |
| } |
| |
| func (s implAgentServerStub) BlessingStoreSet(ctx ipc.ServerContext, i0 security.WireBlessings, i1 security.BlessingPattern) (security.WireBlessings, error) { |
| return s.impl.BlessingStoreSet(ctx, i0, i1) |
| } |
| |
| func (s implAgentServerStub) BlessingStoreForPeer(ctx ipc.ServerContext, i0 []string) (security.WireBlessings, error) { |
| return s.impl.BlessingStoreForPeer(ctx, i0) |
| } |
| |
| func (s implAgentServerStub) BlessingStoreSetDefault(ctx ipc.ServerContext, i0 security.WireBlessings) error { |
| return s.impl.BlessingStoreSetDefault(ctx, i0) |
| } |
| |
| func (s implAgentServerStub) BlessingStoreDefault(ctx ipc.ServerContext) (security.WireBlessings, error) { |
| return s.impl.BlessingStoreDefault(ctx) |
| } |
| |
| func (s implAgentServerStub) BlessingStorePeerBlessings(ctx ipc.ServerContext) (map[security.BlessingPattern]security.WireBlessings, error) { |
| return s.impl.BlessingStorePeerBlessings(ctx) |
| } |
| |
| func (s implAgentServerStub) BlessingStoreDebugString(ctx ipc.ServerContext) (string, error) { |
| return s.impl.BlessingStoreDebugString(ctx) |
| } |
| |
| func (s implAgentServerStub) BlessingRootsAdd(ctx ipc.ServerContext, i0 []byte, i1 security.BlessingPattern) error { |
| return s.impl.BlessingRootsAdd(ctx, i0, i1) |
| } |
| |
| func (s implAgentServerStub) BlessingRootsRecognized(ctx ipc.ServerContext, i0 []byte, i1 string) error { |
| return s.impl.BlessingRootsRecognized(ctx, i0, i1) |
| } |
| |
| func (s implAgentServerStub) BlessingRootsDebugString(ctx ipc.ServerContext) (string, error) { |
| return s.impl.BlessingRootsDebugString(ctx) |
| } |
| |
| func (s implAgentServerStub) NotifyWhenChanged(ctx *AgentNotifyWhenChangedContextStub) error { |
| return s.impl.NotifyWhenChanged(ctx) |
| } |
| |
| func (s implAgentServerStub) Globber() *ipc.GlobState { |
| return s.gs |
| } |
| |
| func (s implAgentServerStub) Describe__() []ipc.InterfaceDesc { |
| return []ipc.InterfaceDesc{AgentDesc} |
| } |
| |
| // AgentDesc describes the Agent interface. |
| var AgentDesc ipc.InterfaceDesc = descAgent |
| |
| // descAgent hides the desc to keep godoc clean. |
| var descAgent = ipc.InterfaceDesc{ |
| Name: "Agent", |
| PkgPath: "v.io/core/veyron/security/agent/server", |
| Methods: []ipc.MethodDesc{ |
| { |
| Name: "Bless", |
| InArgs: []ipc.ArgDesc{ |
| {"key", ``}, // []byte |
| {"wit", ``}, // security.WireBlessings |
| {"extension", ``}, // string |
| {"caveat", ``}, // security.Caveat |
| {"additionalCaveats", ``}, // []security.Caveat |
| }, |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // security.WireBlessings |
| }, |
| }, |
| { |
| Name: "BlessSelf", |
| InArgs: []ipc.ArgDesc{ |
| {"name", ``}, // string |
| {"caveats", ``}, // []security.Caveat |
| }, |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // security.WireBlessings |
| }, |
| }, |
| { |
| Name: "Sign", |
| InArgs: []ipc.ArgDesc{ |
| {"message", ``}, // []byte |
| }, |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // security.Signature |
| }, |
| }, |
| { |
| Name: "MintDischarge", |
| InArgs: []ipc.ArgDesc{ |
| {"forCaveat", ``}, // security.Caveat |
| {"caveatOnDischarge", ``}, // security.Caveat |
| {"additionalCaveatsOnDischarge", ``}, // []security.Caveat |
| }, |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // security.WireDischarge |
| }, |
| }, |
| { |
| Name: "PublicKey", |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // []byte |
| }, |
| }, |
| { |
| Name: "BlessingsByName", |
| InArgs: []ipc.ArgDesc{ |
| {"name", ``}, // security.BlessingPattern |
| }, |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // []security.WireBlessings |
| }, |
| }, |
| { |
| Name: "BlessingsInfo", |
| InArgs: []ipc.ArgDesc{ |
| {"blessings", ``}, // security.WireBlessings |
| }, |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // map[string][]security.Caveat |
| }, |
| }, |
| { |
| Name: "AddToRoots", |
| InArgs: []ipc.ArgDesc{ |
| {"blessing", ``}, // security.WireBlessings |
| }, |
| }, |
| { |
| Name: "BlessingStoreSet", |
| InArgs: []ipc.ArgDesc{ |
| {"blessings", ``}, // security.WireBlessings |
| {"forPeers", ``}, // security.BlessingPattern |
| }, |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // security.WireBlessings |
| }, |
| }, |
| { |
| Name: "BlessingStoreForPeer", |
| InArgs: []ipc.ArgDesc{ |
| {"peerBlessings", ``}, // []string |
| }, |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // security.WireBlessings |
| }, |
| }, |
| { |
| Name: "BlessingStoreSetDefault", |
| InArgs: []ipc.ArgDesc{ |
| {"blessings", ``}, // security.WireBlessings |
| }, |
| }, |
| { |
| Name: "BlessingStoreDefault", |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // security.WireBlessings |
| }, |
| }, |
| { |
| Name: "BlessingStorePeerBlessings", |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // map[security.BlessingPattern]security.WireBlessings |
| }, |
| }, |
| { |
| Name: "BlessingStoreDebugString", |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // string |
| }, |
| }, |
| { |
| Name: "BlessingRootsAdd", |
| InArgs: []ipc.ArgDesc{ |
| {"root", ``}, // []byte |
| {"pattern", ``}, // security.BlessingPattern |
| }, |
| }, |
| { |
| Name: "BlessingRootsRecognized", |
| InArgs: []ipc.ArgDesc{ |
| {"root", ``}, // []byte |
| {"blessing", ``}, // string |
| }, |
| }, |
| { |
| Name: "BlessingRootsDebugString", |
| OutArgs: []ipc.ArgDesc{ |
| {"", ``}, // string |
| }, |
| }, |
| { |
| Name: "NotifyWhenChanged", |
| Doc: "// Clients using caching should call NotifyWhenChanged upon connecting to\n// the server. The server will stream back values whenever the client should\n// flush the cache. The streamed value is arbitrary, simply flush whenever\n// recieving a new item.", |
| }, |
| }, |
| } |
| |
| // AgentNotifyWhenChangedServerStream is the server stream for Agent.NotifyWhenChanged. |
| type AgentNotifyWhenChangedServerStream interface { |
| // SendStream returns the send side of the Agent.NotifyWhenChanged server stream. |
| SendStream() interface { |
| // Send places the item onto the output stream. Returns errors encountered |
| // while sending. Blocks if there is no buffer space; will unblock when |
| // buffer space is available. |
| Send(item bool) error |
| } |
| } |
| |
| // AgentNotifyWhenChangedContext represents the context passed to Agent.NotifyWhenChanged. |
| type AgentNotifyWhenChangedContext interface { |
| ipc.ServerContext |
| AgentNotifyWhenChangedServerStream |
| } |
| |
| // AgentNotifyWhenChangedContextStub is a wrapper that converts ipc.ServerCall into |
| // a typesafe stub that implements AgentNotifyWhenChangedContext. |
| type AgentNotifyWhenChangedContextStub struct { |
| ipc.ServerCall |
| } |
| |
| // Init initializes AgentNotifyWhenChangedContextStub from ipc.ServerCall. |
| func (s *AgentNotifyWhenChangedContextStub) Init(call ipc.ServerCall) { |
| s.ServerCall = call |
| } |
| |
| // SendStream returns the send side of the Agent.NotifyWhenChanged server stream. |
| func (s *AgentNotifyWhenChangedContextStub) SendStream() interface { |
| Send(item bool) error |
| } { |
| return implAgentNotifyWhenChangedContextSend{s} |
| } |
| |
| type implAgentNotifyWhenChangedContextSend struct { |
| s *AgentNotifyWhenChangedContextStub |
| } |
| |
| func (s implAgentNotifyWhenChangedContextSend) Send(item bool) error { |
| return s.s.Send(item) |
| } |