server

package module
v0.0.0-...-1bd3d81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server structure

func NewServer

func NewServer(args ServerArgs) *Server

NewServer returns a new server instance

func (*Server) DeleteModel

func (s *Server) DeleteModel(ctx context.Context, model *pb.Model) (*pb.Model, error)

DeleteModel deletes a model from the database (not S3)

func (*Server) DeleteOrganization

func (s *Server) DeleteOrganization(ctx context.Context, organization *pb.Organization) (*pb.Organization, error)

DeleteOrganization deletes an organization from database

func (*Server) DeleteProject

func (s *Server) DeleteProject(ctx context.Context, project *pb.Project) (*pb.Project, error)

DeleteProject deletes a project from database

func (*Server) DeleteTeam

func (s *Server) DeleteTeam(ctx context.Context, team *pb.Team) (*pb.Team, error)

DeleteTeam deletes a team from database

func (*Server) DeleteUser

func (s *Server) DeleteUser(ctx context.Context, user *pb.User) (*pb.User, error)

DeleteUser deletes a user from database

func (*Server) GetOrganization

func (s *Server) GetOrganization(ctx context.Context, identifier *pb.Identifier) (*pb.Organization, error)

GetOrganization returns an organization

func (*Server) GetProject

func (s *Server) GetProject(ctx context.Context, identifier *pb.Identifier) (*pb.Project, error)

GetProject returns a project

func (*Server) GetTeam

func (s *Server) GetTeam(ctx context.Context, identifier *pb.Identifier) (*pb.Team, error)

GetTeam returns a team from database

func (*Server) GetUser

func (s *Server) GetUser(ctx context.Context, identifier *pb.Identifier) (*pb.User, error)

GetUser returns a User from database

func (*Server) Init

func (s *Server) Init() *Server

Init initiates the server

func (*Server) ListModels

func (s *Server) ListModels(identifier *pb.Identifier, listModelsServer pb.Kato_ListModelsServer) error

ListModels returns a list of model ids

func (*Server) ListOrganizations

func (s *Server) ListOrganizations(identifier *pb.Identifier, listOrganizationsServer pb.Kato_ListOrganizationsServer) error

ListOrganizations returns a list of organization ids

func (*Server) ListProjects

func (s *Server) ListProjects(identifier *pb.Identifier, listProjectsServer pb.Kato_ListProjectsServer) error

ListProjects returns a list of project ids

func (*Server) ListTeam

func (s *Server) ListTeam(identifier *pb.Identifier, listTeamServer pb.Kato_ListTeamServer) error

ListTeam returns a list of team ids

func (*Server) ListUser

func (s *Server) ListUser(identifier *pb.Identifier, listUserServer pb.Kato_ListUserServer) error

ListUser returns a list of user ids

func (*Server) PutModel

func (s *Server) PutModel(ctx context.Context, model *pb.Model) (*pb.Model, error)

PutModel creates/updates a model

func (*Server) PutOrganization

func (s *Server) PutOrganization(ctx context.Context, Organization *pb.Organization) (*pb.Organization, error)

PutOrganization creates/updates an organization

func (*Server) PutProject

func (s *Server) PutProject(ctx context.Context, Project *pb.Project) (*pb.Project, error)

PutProject creates/updates a project

func (*Server) PutTeam

func (s *Server) PutTeam(ctx context.Context, Team *pb.Team) (*pb.Team, error)

PutTeam creates/updates a team

func (*Server) PutUser

func (s *Server) PutUser(ctx context.Context, User *pb.User) (*pb.User, error)

PutUser creates/updates a user

func (*Server) Serve

func (s *Server) Serve()

Serve starts to serve grpc

type ServerArgs

type ServerArgs struct {
	S3 struct {
		AccessKeyID     string
		SecretAccessKey string
		Endpoint        string
		SSL             bool
	}
	Database struct {
		Host     string
		User     string
		Secret   string
		Database string
	}
	// contains filtered or unexported fields
}

ServerArgs represents the arguments kato server starts with

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL