Documentation ¶
Index ¶
- func Call(ctx context.Context, target interface{}, method string, ...) (interface{}, error)
- func ServeRWC(ctx context.Context, rwc io.ReadWriteCloser, o owl.API) error
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateChannel(ctx context.Context, req *owl.CreateChannelReq) error
- func (c *Client) CreateContact(ctx context.Context, req *owl.CreateContactReq) error
- func (c *Client) CreatePersona(ctx context.Context, req *owl.CreatePersonaReq) error
- func (c *Client) DeleteChannel(ctx context.Context, cid *owl.ChannelID) error
- func (c *Client) DeleteContact(ctx context.Context, req *owl.DeleteContactReq) error
- func (c *Client) DropPersona(ctx context.Context, req string) error
- func (c *Client) ExpandPersona(ctx context.Context, req *owl.ExpandPersonaReq) error
- func (c *Client) GetChannel(ctx context.Context, cid *owl.ChannelID) (*owl.ChannelInfo, error)
- func (c *Client) GetContact(ctx context.Context, req *owl.GetContactReq) (*owl.Contact, error)
- func (c *Client) GetPersona(ctx context.Context, req *owl.GetPersonaReq) (*owl.Persona, error)
- func (c *Client) JoinChannel(ctx context.Context, req *owl.JoinChannelReq) error
- func (c *Client) ListChannels(ctx context.Context, req *owl.ListChannelReq) ([]string, error)
- func (c *Client) ListContact(ctx context.Context, req *owl.ListContactReq) ([]string, error)
- func (c *Client) ListPersonas(ctx context.Context) ([]string, error)
- func (c *Client) Read(ctx context.Context, req *owl.ReadReq) ([]owl.Entry, error)
- func (c *Client) Send(ctx context.Context, req *owl.SendReq) error
- func (c *Client) ShrinkPersona(ctx context.Context, req *owl.ShrinkPersonaReq) error
- func (c *Client) Sync(ctx context.Context, req *owl.SyncReq) error
- func (c *Client) Wait(ctx context.Context, req *owl.WaitReq) (*owl.WaitRes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(ctx context.Context, target interface{}, method string, reqData json.RawMessage) (interface{}, error)
Call looks for a method on target, and then unmarshals reqData into something that looks like its input
Valid method signatures: - (a *A) func(ctx context.Context) error - (a *A) func(ctx context.Context, req *X) error - (a *A) func(ctx context.Context) (*Y, error) - (a *A) func(ctx context.Context, req *X) (*Y, error)
- The method can have 1 or 2 output values, and the last one must be an error - The method can have 2 or 3 input values--including the receiver. - The first input is the receiver, the second is a context.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(rwc io.ReadWriteCloser) *Client
func (*Client) CreateChannel ¶
CreateChannel creates a new channel with name
func (*Client) CreateContact ¶
CreateContact adds a contact to the contact list for persona
func (*Client) CreatePersona ¶
CreatePersona creates a new persona called name. If any ids are provided then the persona will not have a feed, and will attempt to join a feed provided by one of the IDs.
func (*Client) DeleteChannel ¶
DeleteChannel deletes the channel with name if it exists
func (*Client) DeleteContact ¶
RemoveContact removes a contact.
func (*Client) DropPersona ¶
DropPersona implements owl.DropPersona
func (*Client) ExpandPersona ¶
ExpandPersona adds a peer to the Persona at name.
func (*Client) GetChannel ¶
GetLatest returns the latest EntryIndex
func (*Client) GetContact ¶
GetContact returns information about a contact.
func (*Client) GetPersona ¶
GetPersona retrieves the Persona at name
func (*Client) JoinChannel ¶
JoinChannel joins an existing channel
func (*Client) ListChannels ¶
ListChannels lists channels starting with begin
func (*Client) ListContact ¶
ListContacts lists contacts starting with begin.
func (*Client) ListPersonas ¶
ListPersonas lists personas on the instance.
func (*Client) ShrinkPersona ¶
ShrinkPersona removes a peer from the Persona at name