Documentation ¶
Index ¶
- func GRPC(addr string, s *service.Service) error
- func InputValidationInterceptor() grpc.UnaryServerInterceptor
- func NewGRPCServer(s *service.Service) *grpc.Server
- type TeamServer
- func (t *TeamServer) AddTeamMembers(ctx context.Context, req *teams.AddTeamMembersReq) (*teams.AddTeamMembersResp, error)
- func (t *TeamServer) CreateTeam(ctx context.Context, req *teams.CreateTeamReq) (*teams.CreateTeamResp, error)
- func (t *TeamServer) DeleteTeam(ctx context.Context, req *teams.DeleteTeamReq) (*teams.DeleteTeamResp, error)
- func (t *TeamServer) GetTeam(ctx context.Context, req *teams.GetTeamReq) (*teams.GetTeamResp, error)
- func (t *TeamServer) GetTeamMembership(ctx context.Context, req *teams.GetTeamMembershipReq) (*teams.GetTeamMembershipResp, error)
- func (t *TeamServer) GetTeamsForMember(ctx context.Context, req *teams.GetTeamsForMemberReq) (*teams.GetTeamsForMemberResp, error)
- func (t *TeamServer) GetVersion(ctx context.Context, _ *ver_api.VersionInfoRequest) (*ver_api.VersionInfo, error)
- func (t *TeamServer) ListTeams(ctx context.Context, req *teams.ListTeamsReq) (*teams.ListTeamsResp, error)
- func (t *TeamServer) PurgeUserMembership(ctx context.Context, req *teams.PurgeUserMembershipReq) (*teams.PurgeUserMembershipResp, error)
- func (t *TeamServer) RemoveTeamMembers(ctx context.Context, req *teams.RemoveTeamMembersReq) (*teams.RemoveTeamMembersResp, error)
- func (t *TeamServer) UpdateTeam(ctx context.Context, req *teams.UpdateTeamReq) (*teams.UpdateTeamResp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InputValidationInterceptor ¶
func InputValidationInterceptor() grpc.UnaryServerInterceptor
InputValidationInterceptor is a middleware for running the protobuf validation.
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 ¶
func (t *TeamServer) AddTeamMembers(ctx context.Context, req *teams.AddTeamMembersReq) (*teams.AddTeamMembersResp, error)
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 ¶
func (t *TeamServer) GetTeamMembership(ctx context.Context, req *teams.GetTeamMembershipReq) (*teams.GetTeamMembershipResp, error)
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 ¶
func (t *TeamServer) GetVersion( ctx context.Context, _ *ver_api.VersionInfoRequest) (*ver_api.VersionInfo, error)
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 ¶
func (t *TeamServer) PurgeUserMembership(ctx context.Context, req *teams.PurgeUserMembershipReq) (*teams.PurgeUserMembershipResp, error)
PurgeUserMembership removes the user's membership from all teams to which the user belongs and returns that list of teams
func (*TeamServer) RemoveTeamMembers ¶
func (t *TeamServer) RemoveTeamMembers(ctx context.Context, req *teams.RemoveTeamMembersReq) (*teams.RemoveTeamMembersResp, error)
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