Documentation
¶
Index ¶
- func SetLogger(l Logger) func()
- type Client
- func (c *Client) Account(ctx context.Context, account *keys.EdX25519Key) (*api.AccountResponse, error)
- func (c *Client) AccountAuthSave(ctx context.Context, auth *auth.Auth, account *keys.EdX25519Key) error
- func (c *Client) AccountAuths(ctx context.Context, account *keys.EdX25519Key) ([]*auth.Auth, error)
- func (c *Client) AccountCreate(ctx context.Context, account *keys.EdX25519Key, email string, ...) error
- func (c *Client) AccountInvite(ctx context.Context, email string, account *keys.EdX25519Key) error
- func (c *Client) AccountRegister(ctx context.Context, email string, registerCode string) error
- func (c *Client) AccountSetUsername(ctx context.Context, username string, account *keys.EdX25519Key) error
- func (c *Client) Channel(ctx context.Context, channel *keys.EdX25519Key, account *keys.EdX25519Key) (*api.Channel, error)
- func (c *Client) ChannelCreateWithTeam(ctx context.Context, channel *keys.EdX25519Key, info *api.ChannelInfo, ...) (string, error)
- func (c *Client) ChannelCreateWithUsers(ctx context.Context, channel *keys.EdX25519Key, info *api.ChannelInfo, ...) (string, error)
- func (c *Client) ChannelDelete(ctx context.Context, key *keys.EdX25519Key) error
- func (c *Client) ChannelUsers(ctx context.Context, channel *keys.EdX25519Key) ([]keys.ID, error)
- func (c *Client) ChannelUsersAdd(ctx context.Context, channel *keys.EdX25519Key, users []keys.ID) error
- func (c *Client) ChannelUsersRemove(ctx context.Context, channel *keys.EdX25519Key, users []keys.ID) error
- func (c *Client) Channels(ctx context.Context, team keys.ID, account *keys.EdX25519Key) ([]*api.Channel, error)
- func (c *Client) Config(ctx context.Context, account *keys.EdX25519Key) (*api.Config, error)
- func (c *Client) Messages(ctx context.Context, channel *keys.EdX25519Key, index int64) (*Messages, error)
- func (c *Client) SendMessage(ctx context.Context, message *api.Message, channel *keys.EdX25519Key, ...) error
- func (c *Client) ShareOpen(ctx context.Context, key *keys.EdX25519Key, account *keys.EdX25519Key) ([]byte, error)
- func (c *Client) ShareSeal(ctx context.Context, key *keys.EdX25519Key, account *keys.EdX25519Key, ...) error
- func (c *Client) Team(ctx context.Context, team *keys.EdX25519Key) (*api.Team, error)
- func (c *Client) TeamCreate(ctx context.Context, team *keys.EdX25519Key, account *keys.EdX25519Key) error
- func (c *Client) TeamCreateDomain(ctx context.Context, team *keys.EdX25519Key, account *keys.EdX25519Key, ...) error
- func (c *Client) TeamInvite(ctx context.Context, team *keys.EdX25519Key, email string, ...) (string, error)
- func (c *Client) TeamInviteOpen(ctx context.Context, phrase string, account *keys.EdX25519Key) (*TeamInvite, error)
- func (c *Client) TeamSign(team *keys.EdX25519Key, domain string, ts time.Time) (string, error)
- func (c *Client) UserLookup(ctx context.Context, field string, value string, account *keys.EdX25519Key) (*api.User, error)
- type LogLevel
- type Logger
- type Messages
- type TeamInvite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client ...
func (*Client) Account ¶
func (c *Client) Account(ctx context.Context, account *keys.EdX25519Key) (*api.AccountResponse, error)
func (*Client) AccountAuthSave ¶
func (*Client) AccountAuths ¶
func (*Client) AccountCreate ¶
func (*Client) AccountInvite ¶
func (*Client) AccountRegister ¶
Register account. registerCode is optional if email address was invited explicitly.
func (*Client) AccountSetUsername ¶
func (*Client) Channel ¶
func (c *Client) Channel(ctx context.Context, channel *keys.EdX25519Key, account *keys.EdX25519Key) (*api.Channel, error)
func (*Client) ChannelCreateWithTeam ¶
func (c *Client) ChannelCreateWithTeam(ctx context.Context, channel *keys.EdX25519Key, info *api.ChannelInfo, team keys.ID, account *keys.EdX25519Key) (string, error)
func (*Client) ChannelCreateWithUsers ¶
func (c *Client) ChannelCreateWithUsers(ctx context.Context, channel *keys.EdX25519Key, info *api.ChannelInfo, users []keys.ID, account *keys.EdX25519Key) (string, error)
func (*Client) ChannelDelete ¶
func (*Client) ChannelUsers ¶
func (*Client) ChannelUsersAdd ¶
func (*Client) ChannelUsersRemove ¶
func (*Client) Messages ¶
func (c *Client) Messages(ctx context.Context, channel *keys.EdX25519Key, index int64) (*Messages, error)
Messages. If truncated, there are more results if you call again with the new index.
func (*Client) SendMessage ¶
func (c *Client) SendMessage(ctx context.Context, message *api.Message, channel *keys.EdX25519Key, sender *keys.EdX25519Key) error
SendMessage sends message data to the channel. Data is encrypted with the channel key before saving.
func (*Client) ShareOpen ¶
func (c *Client) ShareOpen(ctx context.Context, key *keys.EdX25519Key, account *keys.EdX25519Key) ([]byte, error)
ShareOpen opens a secret.
func (*Client) ShareSeal ¶
func (c *Client) ShareSeal(ctx context.Context, key *keys.EdX25519Key, account *keys.EdX25519Key, data []byte, expire time.Duration) error
ShareSeal shares a secret with expiry.
func (*Client) TeamCreate ¶
func (c *Client) TeamCreate(ctx context.Context, team *keys.EdX25519Key, account *keys.EdX25519Key) error
func (*Client) TeamCreateDomain ¶
func (c *Client) TeamCreateDomain(ctx context.Context, team *keys.EdX25519Key, account *keys.EdX25519Key, domain string) error
func (*Client) TeamInvite ¶
func (c *Client) TeamInvite(ctx context.Context, team *keys.EdX25519Key, email string, account *keys.EdX25519Key) (string, error)
TeamInvite invites using a phrase. If email if empty, you can use the code from TeamInviteOpen when doing AccountRegister.
func (*Client) TeamInviteOpen ¶
func (c *Client) TeamInviteOpen(ctx context.Context, phrase string, account *keys.EdX25519Key) (*TeamInvite, error)
type Logger ¶
type Logger interface {
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Warningf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Fatalf(format string, args ...interface{})
}
Logger interface used in this package.
type TeamInvite ¶
type TeamInvite struct {
TeamKey *keys.EdX25519Key
RegisterCode string
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.