Documentation ¶
Overview ¶
Package rpc provides the rpc user client used by the Polyglottis Application and a simple user server wrapper.
Index ¶
- func NewUserServer(s user.Server, addr string) *rpc.Server
- type Client
- func (c *Client) DeleteToken(n user.Name, token string) error
- func (c *Client) GetAccount(n user.Name) (*user.Account, error)
- func (c *Client) GetAccountByEmail(email string) (*user.Account, error)
- func (c *Client) NewAccount(r *user.NewAccountRequest) (*user.Account, error)
- func (c *Client) NewToken(n user.Name) (token string, err error)
- func (c *Client) UpdateAccount(a *user.Account) error
- func (c *Client) ValidToken(n user.Name, token string) (valid bool, err error)
- type NamedToken
- type UserServer
- func (s *UserServer) DeleteToken(t *NamedToken, nothing *bool) (err error)
- func (s *UserServer) GetAccount(n user.Name, a *user.Account) error
- func (s *UserServer) GetAccountByEmail(email string, a *user.Account) error
- func (s *UserServer) NewAccount(r *user.NewAccountRequest, a *user.Account) error
- func (s *UserServer) NewToken(n user.Name, token *string) (err error)
- func (s *UserServer) UpdateAccount(a *user.Account, nothing *bool) (err error)
- func (s *UserServer) ValidToken(t *NamedToken, valid *bool) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a user.Server which forwards method calls to another user.Server over rpc.
func (*Client) GetAccountByEmail ¶
func (*Client) NewAccount ¶
type NamedToken ¶
type UserServer ¶
type UserServer struct {
// contains filtered or unexported fields
}
UserServer is the rpc user server object. It is used internally by NewUserServer, and is not meant to be instantiated directly. It needs to be exported for rpc to work.
func (*UserServer) DeleteToken ¶
func (s *UserServer) DeleteToken(t *NamedToken, nothing *bool) (err error)
func (*UserServer) GetAccount ¶
func (*UserServer) GetAccountByEmail ¶
func (s *UserServer) GetAccountByEmail(email string, a *user.Account) error
func (*UserServer) NewAccount ¶
func (s *UserServer) NewAccount(r *user.NewAccountRequest, a *user.Account) error
func (*UserServer) UpdateAccount ¶
func (s *UserServer) UpdateAccount(a *user.Account, nothing *bool) (err error)
func (*UserServer) ValidToken ¶
func (s *UserServer) ValidToken(t *NamedToken, valid *bool) (err error)
Click to show internal directories.
Click to hide internal directories.