Documentation ¶
Overview ¶
Package admin provides the client for the admin service.
Index ¶
- type AuthInterceptor
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateProject(ctx context.Context, name string) (*types.Project, error)
- func (c *Client) Dial(adminAddr string) error
- func (c *Client) GetProject(ctx context.Context, name string) (*types.Project, 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) ([]*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) 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) Stream ¶ added in v0.2.14
func (i *AuthInterceptor) Stream() grpc.StreamClientInterceptor
Stream creates a stream server interceptor for authorization.
func (*AuthInterceptor) Unary ¶ added in v0.2.14
func (i *AuthInterceptor) Unary() grpc.UnaryClientInterceptor
Unary creates a unary server interceptor for authorization.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for admin service.
func (*Client) CreateProject ¶
CreateProject creates a new project.
func (*Client) GetProject ¶ added in v0.2.16
GetProject gets the project by name.
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) ([]*types.DocumentSummary, error)
ListDocuments lists documents.
func (*Client) ListProjects ¶
ListProjects lists all projects.
type Option ¶
type Option func(*Options)
Option configures Options.
func WithLogger ¶
WithLogger configures the Logger of the client.