Documentation ¶
Overview ¶
Package admin provides the admin server.
Index ¶
- Variables
- type Config
- type Server
- func (s *Server) CreateProject(ctx context.Context, req *api.CreateProjectRequest) (*api.CreateProjectResponse, error)
- func (s *Server) GRPCServer() *grpc.Server
- func (s *Server) GetDocument(ctx context.Context, req *api.GetDocumentRequest) (*api.GetDocumentResponse, error)
- func (s *Server) GetProject(ctx context.Context, req *api.GetProjectRequest) (*api.GetProjectResponse, error)
- func (s *Server) GetSnapshotMeta(ctx context.Context, req *api.GetSnapshotMetaRequest) (*api.GetSnapshotMetaResponse, error)
- func (s *Server) ListChanges(ctx context.Context, req *api.ListChangesRequest) (*api.ListChangesResponse, error)
- func (s *Server) ListDocuments(ctx context.Context, req *api.ListDocumentsRequest) (*api.ListDocumentsResponse, error)
- func (s *Server) ListProjects(ctx context.Context, _ *api.ListProjectsRequest) (*api.ListProjectsResponse, error)
- func (s *Server) LogIn(ctx context.Context, req *api.LogInRequest) (*api.LogInResponse, error)
- func (s *Server) SearchDocuments(ctx context.Context, req *api.SearchDocumentsRequest) (*api.SearchDocumentsResponse, error)
- func (s *Server) Shutdown(graceful bool)
- func (s *Server) SignUp(ctx context.Context, req *api.SignUpRequest) (*api.SignUpResponse, error)
- func (s *Server) Start() error
- func (s *Server) UpdateProject(ctx context.Context, req *api.UpdateProjectRequest) (*api.UpdateProjectResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidAdminPort = errors.New("invalid port number for Admin server")
ErrInvalidAdminPort occurs when the port in the config is invalid.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Port int `yaml:"Port"`
}
Config is the configuration for creating a Server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the gRPC server for admin service.
func (*Server) CreateProject ¶
func (s *Server) CreateProject( ctx context.Context, req *api.CreateProjectRequest, ) (*api.CreateProjectResponse, error)
CreateProject creates a new project.
func (*Server) GRPCServer ¶
GRPCServer returns the gRPC server.
func (*Server) GetDocument ¶
func (s *Server) GetDocument( ctx context.Context, req *api.GetDocumentRequest, ) (*api.GetDocumentResponse, error)
GetDocument gets the document.
func (*Server) GetProject ¶ added in v0.2.6
func (s *Server) GetProject( ctx context.Context, req *api.GetProjectRequest, ) (*api.GetProjectResponse, error)
GetProject gets a project.
func (*Server) GetSnapshotMeta ¶ added in v0.2.11
func (s *Server) GetSnapshotMeta( ctx context.Context, req *api.GetSnapshotMetaRequest, ) (*api.GetSnapshotMetaResponse, error)
GetSnapshotMeta gets the snapshot metadata that corresponds to the server sequence.
func (*Server) ListChanges ¶ added in v0.2.9
func (s *Server) ListChanges( ctx context.Context, req *api.ListChangesRequest, ) (*api.ListChangesResponse, error)
ListChanges lists of changes for the given document.
func (*Server) ListDocuments ¶
func (s *Server) ListDocuments( ctx context.Context, req *api.ListDocumentsRequest, ) (*api.ListDocumentsResponse, error)
ListDocuments lists documents.
func (*Server) ListProjects ¶
func (s *Server) ListProjects( ctx context.Context, _ *api.ListProjectsRequest, ) (*api.ListProjectsResponse, error)
ListProjects lists all projects.
func (*Server) LogIn ¶ added in v0.2.14
func (s *Server) LogIn( ctx context.Context, req *api.LogInRequest, ) (*api.LogInResponse, error)
LogIn logs in a user.
func (*Server) SearchDocuments ¶ added in v0.2.13
func (s *Server) SearchDocuments( ctx context.Context, req *api.SearchDocumentsRequest, ) (*api.SearchDocumentsResponse, error)
SearchDocuments searches documents for a specified string.
func (*Server) SignUp ¶ added in v0.2.14
func (s *Server) SignUp( ctx context.Context, req *api.SignUpRequest, ) (*api.SignUpResponse, error)
SignUp signs up a user.
func (*Server) UpdateProject ¶
func (s *Server) UpdateProject( ctx context.Context, req *api.UpdateProjectRequest, ) (*api.UpdateProjectResponse, error)
UpdateProject updates the project.
Directories ¶
Path | Synopsis |
---|---|
Package auth provides the authentication and authorization of the admin server.
|
Package auth provides the authentication and authorization of the admin server. |
Package interceptors provides interceptors for Admin server.
|
Package interceptors provides interceptors for Admin server. |