Documentation ¶
Overview ¶
Package guardrpc implements calls from client -> server for token operations.
Index ¶
- Variables
- type RPCclient
- func (rpc RPCclient) GetParams(pubKey *[ed25519.PublicKeySize]byte) ([]byte, error)
- func (rpc RPCclient) GetParamsInternal(pubKey *[ed25519.PublicKeySize]byte) ([]byte, error)
- func (rpc RPCclient) Issue(pubKey, owner *[ed25519.PublicKeySize]byte) ([]byte, []byte, error)
- func (rpc RPCclient) Reissue(pubKey *[ed25519.PublicKeySize]byte, packet []byte) ([]byte, []byte, error)
- func (rpc RPCclient) Spend(pubKey *[ed25519.PublicKeySize]byte, packet []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClientFactory = jsonclient.New
DefaultClientFactory is the default factory for new clients
View Source
var ( // ErrParams is returned if a call returned bad parameters ErrParams = errors.New("guardrpc: bad RPC parameters") )
View Source
var ServiceURL = constants.IssuerURL
ServiceURL is the URL template for issuers. Notice the leading dot and trailing slash
Functions ¶
This section is empty.
Types ¶
type RPCclient ¶
type RPCclient struct { ClientFactory func(string, []byte) (*jsonclient.URLClient, error) ServiceGuardCA []byte // The CA of the serviceguard, if any URL *url.URL // The serviceguard URL template AuthUser, AuthPass string // For optional authentication }
RPCclient encapsulates a service-guard RPC client
func (RPCclient) GetParamsInternal ¶
GetParamsInternal returns params from a service-guard identified by pubKey
Click to show internal directories.
Click to hide internal directories.