Documentation ¶
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) ListDocuments(ctx context.Context, req *api.ListDocumentsRequest) (*api.ListDocumentsResponse, error)
- func (s *Server) ListProjects(ctx context.Context, req *api.ListProjectsRequest) (*api.ListProjectsResponse, error)
- func (s *Server) Shutdown(graceful bool)
- func (s *Server) Start() error
- func (s *Server) UpdateProject(ctx context.Context, req *api.UpdateProjectRequest) (*api.UpdateProjectResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
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) 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, req *api.ListProjectsRequest, ) (*api.ListProjectsResponse, error)
ListProjects lists all projects.
func (*Server) UpdateProject ¶
func (s *Server) UpdateProject( ctx context.Context, req *api.UpdateProjectRequest, ) (*api.UpdateProjectResponse, error)
UpdateProject updates the project.
Click to show internal directories.
Click to hide internal directories.