Documentation ¶
Index ¶
- type Client
- func (c *Client) BuildInfo(ctx context.Context) (*pb.BuildInfoResponse, error)
- func (c *Client) Close() error
- func (c *Client) CreateKey(ctx context.Context, keyType pb.KeyType, secure bool) (*pb.CreateKeyResponse, error)
- func (c *Client) CreateOrg(ctx context.Context, name string) (*pb.CreateOrgResponse, error)
- func (c *Client) DestroyAccount(ctx context.Context) error
- func (c *Client) GetBillingSession(ctx context.Context) (*pb.GetBillingSessionResponse, error)
- func (c *Client) GetIdentity(ctx context.Context) (*pb.GetIdentityResponse, error)
- func (c *Client) GetOrg(ctx context.Context) (*pb.GetOrgResponse, error)
- func (c *Client) GetSessionInfo(ctx context.Context) (*pb.GetSessionInfoResponse, error)
- func (c *Client) InvalidateKey(ctx context.Context, key string) error
- func (c *Client) InviteToOrg(ctx context.Context, email string) (*pb.InviteToOrgResponse, error)
- func (c *Client) IsOrgNameAvailable(ctx context.Context, name string) (*pb.IsOrgNameAvailableResponse, error)
- func (c *Client) IsUsernameAvailable(ctx context.Context, username string) error
- func (c *Client) LeaveOrg(ctx context.Context) error
- func (c *Client) ListBillingUsers(ctx context.Context, opts ...ListOption) (*pb.ListBillingUsersResponse, error)
- func (c *Client) ListKeys(ctx context.Context) (*pb.ListKeysResponse, error)
- func (c *Client) ListOrgs(ctx context.Context) (*pb.ListOrgsResponse, error)
- func (c *Client) RemoveOrg(ctx context.Context) error
- func (c *Client) SetupBilling(ctx context.Context) error
- func (c *Client) Signin(ctx context.Context, usernameOrEmail string) (*pb.SigninResponse, error)
- func (c *Client) Signout(ctx context.Context) error
- func (c *Client) Signup(ctx context.Context, username, email string) (*pb.SignupResponse, error)
- type ListOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the client api.
func NewClient ¶
func NewClient(target string, opts ...grpc.DialOption) (*Client, error)
NewClient starts the client.
func (*Client) CreateKey ¶
func (c *Client) CreateKey(ctx context.Context, keyType pb.KeyType, secure bool) (*pb.CreateKeyResponse, error)
CreateKey creates a new key for the current session.
func (*Client) DestroyAccount ¶
DestroyAccount completely deletes an account and all associated data.
func (*Client) GetBillingSession ¶
GetBillingSession returns a billing portal session url.
func (*Client) GetIdentity ¶
GetIdentity returns the identity of the current session.
func (*Client) GetSessionInfo ¶
GetSessionInfo returns session info.
func (*Client) InvalidateKey ¶
InvalidateKey marks a key as invalid. New threads cannot be created with an invalid key.
func (*Client) InviteToOrg ¶
InviteToOrg invites the given email to an org.
func (*Client) IsOrgNameAvailable ¶
func (c *Client) IsOrgNameAvailable(ctx context.Context, name string) (*pb.IsOrgNameAvailableResponse, error)
IsOrgNameAvailable returns a nil error if the name is valid and available.
func (*Client) IsUsernameAvailable ¶
IsUsernameAvailable returns a nil error if the username is valid and available.
func (*Client) ListBillingUsers ¶
func (c *Client) ListBillingUsers(ctx context.Context, opts ...ListOption) ( *pb.ListBillingUsersResponse, error)
ListBillingUsers returns a list of users the account is responsible for.
func (*Client) SetupBilling ¶
SetupBilling (re-)enables billing for an account, enabling usage beyond the free quotas.
func (*Client) Signin ¶
Signin returns a session for an existing username or email. This method will block and wait for email-based verification.
type ListOption ¶
type ListOption func(*listOptions)
func WithLimit ¶
func WithLimit(limit int64) ListOption
WithLimit is used to set a page size when paginating.
func WithOffset ¶
func WithOffset(offset int64) ListOption
WithOffset is used to fetch the next page when paginating.