teams

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package teams is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTeamsHandler

func RegisterTeamsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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

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 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 (*TeamsServerMock) CreateTeam

func (*TeamsServerMock) DeleteTeam

func (*TeamsServerMock) GetTeam

func (*TeamsServerMock) GetTeams

func (*TeamsServerMock) GetTeamsForUser

func (*TeamsServerMock) GetUsers

func (*TeamsServerMock) GetVersion

func (*TeamsServerMock) RemoveUsers

func (*TeamsServerMock) Reset

func (m *TeamsServerMock) Reset()

Reset resets all overridden functions

func (*TeamsServerMock) UpdateTeam

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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