Documentation ¶
Overview ¶
Package teams is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterTeamsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTeamsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TeamsClient) error
- func RegisterTeamsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTeamsServer(s *grpc.Server, srv TeamsServer)
- type TeamsClient
- type TeamsServer
- type TeamsServerMock
- func (m *TeamsServerMock) AddUsers(ctx context.Context, req *request.AddUsersReq) (*response.AddUsersResp, error)
- func (m *TeamsServerMock) CreateTeam(ctx context.Context, req *request.CreateTeamReq) (*response.CreateTeamResp, error)
- func (m *TeamsServerMock) DeleteTeam(ctx context.Context, req *request.DeleteTeamReq) (*response.DeleteTeamResp, error)
- func (m *TeamsServerMock) GetTeam(ctx context.Context, req *request.GetTeamReq) (*response.GetTeamResp, error)
- func (m *TeamsServerMock) GetTeams(ctx context.Context, req *request.GetTeamsReq) (*response.Teams, error)
- func (m *TeamsServerMock) GetTeamsForUser(ctx context.Context, req *request.GetTeamsForUserReq) (*response.GetTeamsForUserResp, error)
- func (m *TeamsServerMock) GetUsers(ctx context.Context, req *request.GetUsersReq) (*response.GetUsersResp, error)
- func (m *TeamsServerMock) GetVersion(ctx context.Context, req *version.VersionInfoRequest) (*version.VersionInfo, error)
- func (m *TeamsServerMock) RemoveUsers(ctx context.Context, req *request.RemoveUsersReq) (*response.RemoveUsersResp, error)
- func (m *TeamsServerMock) Reset()
- func (m *TeamsServerMock) UpdateTeam(ctx context.Context, req *request.UpdateTeamReq) (*response.UpdateTeamResp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTeamsHandler ¶
RegisterTeamsHandler registers the http handlers for service Teams to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTeamsHandlerClient ¶
func RegisterTeamsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TeamsClient) error
RegisterTeamsHandlerClient registers the http handlers for service Teams to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TeamsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TeamsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TeamsClient" to call the correct interceptors.
func RegisterTeamsHandlerFromEndpoint ¶
func RegisterTeamsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTeamsHandlerFromEndpoint is same as RegisterTeamsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTeamsServer ¶
func RegisterTeamsServer(s *grpc.Server, srv TeamsServer)
Types ¶
type TeamsClient ¶
type TeamsClient interface { GetVersion(ctx context.Context, in *version.VersionInfoRequest, opts ...grpc.CallOption) (*version.VersionInfo, error) GetTeams(ctx context.Context, in *request.GetTeamsReq, opts ...grpc.CallOption) (*response.Teams, error) GetTeam(ctx context.Context, in *request.GetTeamReq, opts ...grpc.CallOption) (*response.GetTeamResp, error) CreateTeam(ctx context.Context, in *request.CreateTeamReq, opts ...grpc.CallOption) (*response.CreateTeamResp, error) UpdateTeam(ctx context.Context, in *request.UpdateTeamReq, opts ...grpc.CallOption) (*response.UpdateTeamResp, error) DeleteTeam(ctx context.Context, in *request.DeleteTeamReq, opts ...grpc.CallOption) (*response.DeleteTeamResp, error) GetUsers(ctx context.Context, in *request.GetUsersReq, opts ...grpc.CallOption) (*response.GetUsersResp, error) AddUsers(ctx context.Context, in *request.AddUsersReq, opts ...grpc.CallOption) (*response.AddUsersResp, error) RemoveUsers(ctx context.Context, in *request.RemoveUsersReq, opts ...grpc.CallOption) (*response.RemoveUsersResp, error) GetTeamsForUser(ctx context.Context, in *request.GetTeamsForUserReq, opts ...grpc.CallOption) (*response.GetTeamsForUserResp, error) }
TeamsClient is the client API for Teams service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTeamsClient ¶
func NewTeamsClient(cc *grpc.ClientConn) TeamsClient
type TeamsServer ¶
type TeamsServer interface { GetVersion(context.Context, *version.VersionInfoRequest) (*version.VersionInfo, error) GetTeams(context.Context, *request.GetTeamsReq) (*response.Teams, error) GetTeam(context.Context, *request.GetTeamReq) (*response.GetTeamResp, error) CreateTeam(context.Context, *request.CreateTeamReq) (*response.CreateTeamResp, error) UpdateTeam(context.Context, *request.UpdateTeamReq) (*response.UpdateTeamResp, error) DeleteTeam(context.Context, *request.DeleteTeamReq) (*response.DeleteTeamResp, error) GetUsers(context.Context, *request.GetUsersReq) (*response.GetUsersResp, error) AddUsers(context.Context, *request.AddUsersReq) (*response.AddUsersResp, error) RemoveUsers(context.Context, *request.RemoveUsersReq) (*response.RemoveUsersResp, error) GetTeamsForUser(context.Context, *request.GetTeamsForUserReq) (*response.GetTeamsForUserResp, error) }
TeamsServer is the server API for Teams service.
type TeamsServerMock ¶
type TeamsServerMock struct { GetVersionFunc func(context.Context, *version.VersionInfoRequest) (*version.VersionInfo, error) GetTeamsFunc func(context.Context, *request.GetTeamsReq) (*response.Teams, error) GetTeamFunc func(context.Context, *request.GetTeamReq) (*response.GetTeamResp, error) CreateTeamFunc func(context.Context, *request.CreateTeamReq) (*response.CreateTeamResp, error) UpdateTeamFunc func(context.Context, *request.UpdateTeamReq) (*response.UpdateTeamResp, error) DeleteTeamFunc func(context.Context, *request.DeleteTeamReq) (*response.DeleteTeamResp, error) GetUsersFunc func(context.Context, *request.GetUsersReq) (*response.GetUsersResp, error) AddUsersFunc func(context.Context, *request.AddUsersReq) (*response.AddUsersResp, error) RemoveUsersFunc func(context.Context, *request.RemoveUsersReq) (*response.RemoveUsersResp, error) GetTeamsForUserFunc func(context.Context, *request.GetTeamsForUserReq) (*response.GetTeamsForUserResp, error) // contains filtered or unexported fields }
TeamsServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns
func NewTeamsServerMock ¶
func NewTeamsServerMock() *TeamsServerMock
NewTeamsServerMock gives you a fresh instance of TeamsServerMock.
func NewTeamsServerMockWithoutValidation ¶
func NewTeamsServerMockWithoutValidation() *TeamsServerMock
NewTeamsServerMockWithoutValidation gives you a fresh instance of TeamsServerMock which does not attempt to validate requests before passing them to their respective '*Func'.
func (*TeamsServerMock) AddUsers ¶
func (m *TeamsServerMock) AddUsers(ctx context.Context, req *request.AddUsersReq) (*response.AddUsersResp, error)
func (*TeamsServerMock) CreateTeam ¶
func (m *TeamsServerMock) CreateTeam(ctx context.Context, req *request.CreateTeamReq) (*response.CreateTeamResp, error)
func (*TeamsServerMock) DeleteTeam ¶
func (m *TeamsServerMock) DeleteTeam(ctx context.Context, req *request.DeleteTeamReq) (*response.DeleteTeamResp, error)
func (*TeamsServerMock) GetTeam ¶
func (m *TeamsServerMock) GetTeam(ctx context.Context, req *request.GetTeamReq) (*response.GetTeamResp, error)
func (*TeamsServerMock) GetTeams ¶
func (m *TeamsServerMock) GetTeams(ctx context.Context, req *request.GetTeamsReq) (*response.Teams, error)
func (*TeamsServerMock) GetTeamsForUser ¶
func (m *TeamsServerMock) GetTeamsForUser(ctx context.Context, req *request.GetTeamsForUserReq) (*response.GetTeamsForUserResp, error)
func (*TeamsServerMock) GetUsers ¶
func (m *TeamsServerMock) GetUsers(ctx context.Context, req *request.GetUsersReq) (*response.GetUsersResp, error)
func (*TeamsServerMock) GetVersion ¶
func (m *TeamsServerMock) GetVersion(ctx context.Context, req *version.VersionInfoRequest) (*version.VersionInfo, error)
func (*TeamsServerMock) RemoveUsers ¶
func (m *TeamsServerMock) RemoveUsers(ctx context.Context, req *request.RemoveUsersReq) (*response.RemoveUsersResp, error)
func (*TeamsServerMock) Reset ¶
func (m *TeamsServerMock) Reset()
Reset resets all overridden functions
func (*TeamsServerMock) UpdateTeam ¶
func (m *TeamsServerMock) UpdateTeam(ctx context.Context, req *request.UpdateTeamReq) (*response.UpdateTeamResp, error)