Documentation ¶
Overview ¶
Package admin provides the client for the admin service.
Index ¶
- type AuthInterceptor
- func (i *AuthInterceptor) SetToken(token string)
- func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i *AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type Client
- func (c *Client) ChangePassword(ctx context.Context, username, password, newPassword string) error
- func (c *Client) Close()
- func (c *Client) CreateProject(ctx context.Context, name string) (*types.Project, error)
- func (c *Client) DeleteAccount(ctx context.Context, username, password string) error
- func (c *Client) Dial(rpcAddr string) error
- func (c *Client) GetProject(ctx context.Context, name string) (*types.Project, error)
- func (c *Client) GetServerVersion(ctx context.Context) (*types.VersionDetail, error)
- func (c *Client) ListChangeSummaries(ctx context.Context, projectName string, key key.Key, previousSeq int64, ...) ([]*types.ChangeSummary, error)
- func (c *Client) ListDocuments(ctx context.Context, projectName string, previousID string, pageSize int32, ...) ([]*types.DocumentSummary, error)
- func (c *Client) ListProjects(ctx context.Context) ([]*types.Project, error)
- func (c *Client) LogIn(ctx context.Context, username, password string) (string, error)
- func (c *Client) RemoveDocument(ctx context.Context, projectName string, documentKey string, force bool) error
- func (c *Client) SignUp(ctx context.Context, username, password string) (*types.User, error)
- func (c *Client) UpdateProject(ctx context.Context, id string, fields *types.UpdatableProjectFields) (*types.Project, error)
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthInterceptor ¶ added in v0.2.14
type AuthInterceptor struct {
// contains filtered or unexported fields
}
AuthInterceptor is an interceptor for authentication.
func NewAuthInterceptor ¶ added in v0.2.14
func NewAuthInterceptor(token string) *AuthInterceptor
NewAuthInterceptor creates a new instance of AuthInterceptor.
func (*AuthInterceptor) SetToken ¶ added in v0.2.14
func (i *AuthInterceptor) SetToken(token string)
SetToken sets the token of the client.
func (*AuthInterceptor) WrapStreamingClient ¶ added in v0.4.11
func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
WrapStreamingClient creates a stream client interceptor for authorization.
func (*AuthInterceptor) WrapStreamingHandler ¶ added in v0.4.11
func (i *AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
WrapStreamingHandler creates a stream server interceptor for authorization.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for admin service.
func (*Client) ChangePassword ¶ added in v0.5.0
ChangePassword changes the user's password.
func (*Client) CreateProject ¶
CreateProject creates a new project.
func (*Client) DeleteAccount ¶ added in v0.5.0
DeleteAccount deletes the user's account.
func (*Client) GetProject ¶ added in v0.2.16
GetProject gets the project by name.
func (*Client) GetServerVersion ¶ added in v0.4.30
GetServerVersion gets the server version.
func (*Client) ListChangeSummaries ¶ added in v0.2.9
func (c *Client) ListChangeSummaries( ctx context.Context, projectName string, key key.Key, previousSeq int64, pageSize int32, isForward bool, ) ([]*types.ChangeSummary, error)
ListChangeSummaries returns the change summaries of the given document.
func (*Client) ListDocuments ¶ added in v0.2.13
func (c *Client) ListDocuments( ctx context.Context, projectName string, previousID string, pageSize int32, isForward bool, includeSnapshot bool, ) ([]*types.DocumentSummary, error)
ListDocuments lists documents.
func (*Client) ListProjects ¶
ListProjects lists all projects.
func (*Client) RemoveDocument ¶ added in v0.4.0
func (c *Client) RemoveDocument( ctx context.Context, projectName string, documentKey string, force bool, ) error
RemoveDocument removes a document of the given key.
type Option ¶
type Option func(*Options)
Option configures Options.
func WithInsecure ¶ added in v0.4.2
WithInsecure configures insecure option of the client.
func WithLogger ¶
WithLogger configures the Logger of the client.