server

package
v0.0.0-...-a8b8e24 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPC

func GRPC(addr string, s *service.Service) error

GRPC creates and listens on grpc server

func InputValidationInterceptor

func InputValidationInterceptor() grpc.UnaryServerInterceptor

InputValidationInterceptor is a middleware for running the protobuf validation.

func NewGRPCServer

func NewGRPCServer(s *service.Service) *grpc.Server

NewGRPCServer creates a grpc server that serves all Teams GRPC APIs

Types

type TeamServer

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

TeamServer is a teams server

func NewTeamServer

func NewTeamServer(service *service.Service) *TeamServer

NewTeamServer returns a Teams server

func (*TeamServer) AddTeamMembers

AddTeamMembers associates an array of members with an existing team

func (*TeamServer) CreateTeam

func (t *TeamServer) CreateTeam(ctx context.Context,
	req *teams.CreateTeamReq) (*teams.CreateTeamResp, error)

CreateTeam creates a new team

func (*TeamServer) DeleteTeam

func (t *TeamServer) DeleteTeam(ctx context.Context, req *teams.DeleteTeamReq) (*teams.DeleteTeamResp, error)

DeleteTeam deletes a team from the db

func (*TeamServer) GetTeam

func (t *TeamServer) GetTeam(ctx context.Context, req *teams.GetTeamReq) (*teams.GetTeamResp, error)

GetTeam takes an ID and returns a Team object

func (*TeamServer) GetTeamMembership

GetTeamMembership fetches a list of member ids associated with a team

func (*TeamServer) GetTeamsForMember

func (t *TeamServer) GetTeamsForMember(
	ctx context.Context,
	req *teams.GetTeamsForMemberReq,
) (*teams.GetTeamsForMemberResp, error)

GetTeamsForMember fetches a list of a members's associated teams

func (*TeamServer) GetVersion

GetVersion returns the version of Teams GRPC API

func (*TeamServer) ListTeams

func (t *TeamServer) ListTeams(ctx context.Context, req *teams.ListTeamsReq) (*teams.ListTeamsResp, error)

ListTeams returns a list of teams from the db

func (*TeamServer) PurgeUserMembership

PurgeUserMembership removes the user's membership from all teams to which the user belongs and returns that list of teams

func (*TeamServer) RemoveTeamMembers

RemoveTeamMembers disassociates an array of members with an existing team.

func (*TeamServer) UpdateTeam

func (t *TeamServer) UpdateTeam(ctx context.Context, req *teams.UpdateTeamReq) (*teams.UpdateTeamResp, error)

UpdateTeam updates a team in the db via post

Jump to

Keyboard shortcuts

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