v2beta

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: 20 Imported by: 0

Documentation

Overview

Package v2beta is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package v2beta is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package v2beta is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package v2beta is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPoliciesHandler

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

RegisterPoliciesHandler registers the http handlers for service Policies to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterPoliciesHandlerClient

func RegisterPoliciesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PoliciesClient) error

RegisterPoliciesHandlerClient registers the http handlers for service Policies to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PoliciesClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PoliciesClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PoliciesClient" to call the correct interceptors.

func RegisterPoliciesHandlerFromEndpoint

func RegisterPoliciesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterPoliciesHandlerFromEndpoint is same as RegisterPoliciesHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterPoliciesServer

func RegisterPoliciesServer(s *grpc.Server, srv PoliciesServer)

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)

func RegisterTokensHandler

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

RegisterTokensHandler registers the http handlers for service Tokens to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTokensHandlerClient

func RegisterTokensHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TokensClient) error

RegisterTokensHandlerClient registers the http handlers for service Tokens to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TokensClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TokensClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TokensClient" to call the correct interceptors.

func RegisterTokensHandlerFromEndpoint

func RegisterTokensHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTokensHandlerFromEndpoint is same as RegisterTokensHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTokensServer

func RegisterTokensServer(s *grpc.Server, srv TokensServer)

func RegisterUsersHandler

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

RegisterUsersHandler registers the http handlers for service Users to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterUsersHandlerClient

func RegisterUsersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersClient) error

RegisterUsersHandlerClient registers the http handlers for service Users to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UsersClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UsersClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UsersClient" to call the correct interceptors.

func RegisterUsersHandlerFromEndpoint

func RegisterUsersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterUsersHandlerFromEndpoint is same as RegisterUsersHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterUsersServer

func RegisterUsersServer(s *grpc.Server, srv UsersServer)

Types

type PoliciesClient

type PoliciesClient interface {
	CreatePolicy(ctx context.Context, in *request.CreatePolicyReq, opts ...grpc.CallOption) (*response.CreatePolicyResp, error)
	GetPolicy(ctx context.Context, in *request.GetPolicyReq, opts ...grpc.CallOption) (*response.GetPolicyResp, error)
	ListPolicies(ctx context.Context, in *request.ListPoliciesReq, opts ...grpc.CallOption) (*response.ListPoliciesResp, error)
	DeletePolicy(ctx context.Context, in *request.DeletePolicyReq, opts ...grpc.CallOption) (*response.DeletePolicyResp, error)
	UpdatePolicy(ctx context.Context, in *request.UpdatePolicyReq, opts ...grpc.CallOption) (*response.UpdatePolicyResp, error)
	GetPolicyVersion(ctx context.Context, in *request.GetPolicyVersionReq, opts ...grpc.CallOption) (*response.GetPolicyVersionResp, error)
	ListPolicyMembers(ctx context.Context, in *request.ListPolicyMembersReq, opts ...grpc.CallOption) (*response.ListPolicyMembersResp, error)
	ReplacePolicyMembers(ctx context.Context, in *request.ReplacePolicyMembersReq, opts ...grpc.CallOption) (*response.ReplacePolicyMembersResp, error)
	RemovePolicyMembers(ctx context.Context, in *request.RemovePolicyMembersReq, opts ...grpc.CallOption) (*response.RemovePolicyMembersResp, error)
	AddPolicyMembers(ctx context.Context, in *request.AddPolicyMembersReq, opts ...grpc.CallOption) (*response.AddPolicyMembersResp, error)
	CreateRole(ctx context.Context, in *request.CreateRoleReq, opts ...grpc.CallOption) (*response.CreateRoleResp, error)
	ListRoles(ctx context.Context, in *request.ListRolesReq, opts ...grpc.CallOption) (*response.ListRolesResp, error)
	GetRole(ctx context.Context, in *request.GetRoleReq, opts ...grpc.CallOption) (*response.GetRoleResp, error)
	DeleteRole(ctx context.Context, in *request.DeleteRoleReq, opts ...grpc.CallOption) (*response.DeleteRoleResp, error)
	UpdateRole(ctx context.Context, in *request.UpdateRoleReq, opts ...grpc.CallOption) (*response.UpdateRoleResp, error)
	CreateProject(ctx context.Context, in *request.CreateProjectReq, opts ...grpc.CallOption) (*response.CreateProjectResp, error)
	UpdateProject(ctx context.Context, in *request.UpdateProjectReq, opts ...grpc.CallOption) (*response.UpdateProjectResp, error)
	GetProject(ctx context.Context, in *request.GetProjectReq, opts ...grpc.CallOption) (*response.GetProjectResp, error)
	ListProjects(ctx context.Context, in *request.ListProjectsReq, opts ...grpc.CallOption) (*response.ListProjectsResp, error)
	DeleteProject(ctx context.Context, in *request.DeleteProjectReq, opts ...grpc.CallOption) (*response.DeleteProjectResp, error)
	// Expose on GRPC API only so we don't expose this to the enduser.
	// Just want to be able to trigger this via automate-cli.
	UpgradeToV2(ctx context.Context, in *request.UpgradeToV2Req, opts ...grpc.CallOption) (*response.UpgradeToV2Resp, error)
	ResetToV1(ctx context.Context, in *request.ResetToV1Req, opts ...grpc.CallOption) (*response.ResetToV1Resp, error)
}

PoliciesClient is the client API for Policies service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPoliciesClient

func NewPoliciesClient(cc *grpc.ClientConn) PoliciesClient

type PoliciesServer

type PoliciesServer interface {
	CreatePolicy(context.Context, *request.CreatePolicyReq) (*response.CreatePolicyResp, error)
	GetPolicy(context.Context, *request.GetPolicyReq) (*response.GetPolicyResp, error)
	ListPolicies(context.Context, *request.ListPoliciesReq) (*response.ListPoliciesResp, error)
	DeletePolicy(context.Context, *request.DeletePolicyReq) (*response.DeletePolicyResp, error)
	UpdatePolicy(context.Context, *request.UpdatePolicyReq) (*response.UpdatePolicyResp, error)
	GetPolicyVersion(context.Context, *request.GetPolicyVersionReq) (*response.GetPolicyVersionResp, error)
	ListPolicyMembers(context.Context, *request.ListPolicyMembersReq) (*response.ListPolicyMembersResp, error)
	ReplacePolicyMembers(context.Context, *request.ReplacePolicyMembersReq) (*response.ReplacePolicyMembersResp, error)
	RemovePolicyMembers(context.Context, *request.RemovePolicyMembersReq) (*response.RemovePolicyMembersResp, error)
	AddPolicyMembers(context.Context, *request.AddPolicyMembersReq) (*response.AddPolicyMembersResp, error)
	CreateRole(context.Context, *request.CreateRoleReq) (*response.CreateRoleResp, error)
	ListRoles(context.Context, *request.ListRolesReq) (*response.ListRolesResp, error)
	GetRole(context.Context, *request.GetRoleReq) (*response.GetRoleResp, error)
	DeleteRole(context.Context, *request.DeleteRoleReq) (*response.DeleteRoleResp, error)
	UpdateRole(context.Context, *request.UpdateRoleReq) (*response.UpdateRoleResp, error)
	CreateProject(context.Context, *request.CreateProjectReq) (*response.CreateProjectResp, error)
	UpdateProject(context.Context, *request.UpdateProjectReq) (*response.UpdateProjectResp, error)
	GetProject(context.Context, *request.GetProjectReq) (*response.GetProjectResp, error)
	ListProjects(context.Context, *request.ListProjectsReq) (*response.ListProjectsResp, error)
	DeleteProject(context.Context, *request.DeleteProjectReq) (*response.DeleteProjectResp, error)
	// Expose on GRPC API only so we don't expose this to the enduser.
	// Just want to be able to trigger this via automate-cli.
	UpgradeToV2(context.Context, *request.UpgradeToV2Req) (*response.UpgradeToV2Resp, error)
	ResetToV1(context.Context, *request.ResetToV1Req) (*response.ResetToV1Resp, error)
}

PoliciesServer is the server API for Policies service.

type PoliciesServerMock

type PoliciesServerMock struct {
	CreatePolicyFunc         func(context.Context, *request.CreatePolicyReq) (*response.CreatePolicyResp, error)
	GetPolicyFunc            func(context.Context, *request.GetPolicyReq) (*response.GetPolicyResp, error)
	ListPoliciesFunc         func(context.Context, *request.ListPoliciesReq) (*response.ListPoliciesResp, error)
	DeletePolicyFunc         func(context.Context, *request.DeletePolicyReq) (*response.DeletePolicyResp, error)
	UpdatePolicyFunc         func(context.Context, *request.UpdatePolicyReq) (*response.UpdatePolicyResp, error)
	GetPolicyVersionFunc     func(context.Context, *request.GetPolicyVersionReq) (*response.GetPolicyVersionResp, error)
	ListPolicyMembersFunc    func(context.Context, *request.ListPolicyMembersReq) (*response.ListPolicyMembersResp, error)
	ReplacePolicyMembersFunc func(context.Context, *request.ReplacePolicyMembersReq) (*response.ReplacePolicyMembersResp, error)
	RemovePolicyMembersFunc  func(context.Context, *request.RemovePolicyMembersReq) (*response.RemovePolicyMembersResp, error)
	AddPolicyMembersFunc     func(context.Context, *request.AddPolicyMembersReq) (*response.AddPolicyMembersResp, error)
	CreateRoleFunc           func(context.Context, *request.CreateRoleReq) (*response.CreateRoleResp, error)
	ListRolesFunc            func(context.Context, *request.ListRolesReq) (*response.ListRolesResp, error)
	GetRoleFunc              func(context.Context, *request.GetRoleReq) (*response.GetRoleResp, error)
	DeleteRoleFunc           func(context.Context, *request.DeleteRoleReq) (*response.DeleteRoleResp, error)
	UpdateRoleFunc           func(context.Context, *request.UpdateRoleReq) (*response.UpdateRoleResp, error)
	CreateProjectFunc        func(context.Context, *request.CreateProjectReq) (*response.CreateProjectResp, error)
	UpdateProjectFunc        func(context.Context, *request.UpdateProjectReq) (*response.UpdateProjectResp, error)
	GetProjectFunc           func(context.Context, *request.GetProjectReq) (*response.GetProjectResp, error)
	ListProjectsFunc         func(context.Context, *request.ListProjectsReq) (*response.ListProjectsResp, error)
	DeleteProjectFunc        func(context.Context, *request.DeleteProjectReq) (*response.DeleteProjectResp, error)
	UpgradeToV2Func          func(context.Context, *request.UpgradeToV2Req) (*response.UpgradeToV2Resp, error)
	ResetToV1Func            func(context.Context, *request.ResetToV1Req) (*response.ResetToV1Resp, error)
	// contains filtered or unexported fields
}

PoliciesServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns

func NewPoliciesServerMock

func NewPoliciesServerMock() *PoliciesServerMock

NewPoliciesServerMock gives you a fresh instance of PoliciesServerMock.

func NewPoliciesServerMockWithoutValidation

func NewPoliciesServerMockWithoutValidation() *PoliciesServerMock

NewPoliciesServerMockWithoutValidation gives you a fresh instance of PoliciesServerMock which does not attempt to validate requests before passing them to their respective '*Func'.

func (*PoliciesServerMock) AddPolicyMembers

func (*PoliciesServerMock) CreatePolicy

func (*PoliciesServerMock) CreateProject

func (*PoliciesServerMock) CreateRole

func (*PoliciesServerMock) DeletePolicy

func (*PoliciesServerMock) DeleteProject

func (*PoliciesServerMock) DeleteRole

func (*PoliciesServerMock) GetPolicy

func (*PoliciesServerMock) GetPolicyVersion

func (*PoliciesServerMock) GetProject

func (*PoliciesServerMock) GetRole

func (*PoliciesServerMock) ListPolicies

func (*PoliciesServerMock) ListPolicyMembers

func (*PoliciesServerMock) ListProjects

func (*PoliciesServerMock) ListRoles

func (*PoliciesServerMock) RemovePolicyMembers

func (*PoliciesServerMock) ReplacePolicyMembers

func (*PoliciesServerMock) Reset

func (m *PoliciesServerMock) Reset()

Reset resets all overridden functions

func (*PoliciesServerMock) ResetToV1

func (*PoliciesServerMock) UpdatePolicy

func (*PoliciesServerMock) UpdateProject

func (*PoliciesServerMock) UpdateRole

func (*PoliciesServerMock) UpgradeToV2

type TeamsClient

type TeamsClient interface {
	GetTeams(ctx context.Context, in *request.GetTeamsReq, opts ...grpc.CallOption) (*response.GetTeamsResp, 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)
	GetTeamMembership(ctx context.Context, in *request.GetTeamMembershipReq, opts ...grpc.CallOption) (*response.GetTeamMembershipResp, error)
	AddTeamMembers(ctx context.Context, in *request.AddTeamMembersReq, opts ...grpc.CallOption) (*response.AddTeamMembersResp, error)
	RemoveTeamMembers(ctx context.Context, in *request.RemoveTeamMembersReq, opts ...grpc.CallOption) (*response.RemoveTeamMembersResp, error)
	GetTeamsForMember(ctx context.Context, in *request.GetTeamsForMemberReq, opts ...grpc.CallOption) (*response.GetTeamsForMemberResp, error)
	// Expose on GRPC API only so we don't expose this to the enduser.
	// Just want to be able to trigger this via automate-cli.
	ApplyV2DataMigrations(ctx context.Context, in *request.ApplyV2DataMigrationsReq, opts ...grpc.CallOption) (*response.ApplyV2DataMigrationsResp, 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

TeamsServer is the server API for Teams service.

type TeamsServerMock

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) AddTeamMembers

func (*TeamsServerMock) ApplyV2DataMigrations

func (*TeamsServerMock) CreateTeam

func (*TeamsServerMock) DeleteTeam

func (*TeamsServerMock) GetTeam

func (*TeamsServerMock) GetTeamMembership

func (*TeamsServerMock) GetTeams

func (*TeamsServerMock) GetTeamsForMember

func (*TeamsServerMock) RemoveTeamMembers

func (*TeamsServerMock) Reset

func (m *TeamsServerMock) Reset()

Reset resets all overridden functions

func (*TeamsServerMock) UpdateTeam

type TokensClient

TokensClient is the client API for Tokens service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTokensClient

func NewTokensClient(cc *grpc.ClientConn) TokensClient

type TokensServer

TokensServer is the server API for Tokens service.

type TokensServerMock

type TokensServerMock struct {
	CreateTokenFunc func(context.Context, *request.CreateTokenReq) (*response.CreateTokenResp, error)
	GetTokenFunc    func(context.Context, *request.GetTokenReq) (*response.GetTokenResp, error)
	UpdateTokenFunc func(context.Context, *request.UpdateTokenReq) (*response.UpdateTokenResp, error)
	DeleteTokenFunc func(context.Context, *request.DeleteTokenReq) (*response.DeleteTokenResp, error)
	ListTokensFunc  func(context.Context, *request.ListTokensReq) (*response.ListTokensResp, error)
	// contains filtered or unexported fields
}

TokensServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns

func NewTokensServerMock

func NewTokensServerMock() *TokensServerMock

NewTokensServerMock gives you a fresh instance of TokensServerMock.

func NewTokensServerMockWithoutValidation

func NewTokensServerMockWithoutValidation() *TokensServerMock

NewTokensServerMockWithoutValidation gives you a fresh instance of TokensServerMock which does not attempt to validate requests before passing them to their respective '*Func'.

func (*TokensServerMock) CreateToken

func (*TokensServerMock) DeleteToken

func (*TokensServerMock) GetToken

func (*TokensServerMock) ListTokens

func (*TokensServerMock) Reset

func (m *TokensServerMock) Reset()

Reset resets all overridden functions

func (*TokensServerMock) UpdateToken

type UsersClient

UsersClient is the client API for Users service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUsersClient

func NewUsersClient(cc *grpc.ClientConn) UsersClient

type UsersServerMock

type UsersServerMock struct {
	CreateUserFunc func(context.Context, *request.CreateUserReq) (*response.CreateUserResp, error)
	GetUsersFunc   func(context.Context, *request.GetUsersReq) (*response.GetUsersResp, error)
	GetUserFunc    func(context.Context, *request.GetUserReq) (*response.GetUserResp, error)
	DeleteUserFunc func(context.Context, *request.DeleteUserReq) (*response.DeleteUserResp, error)
	UpdateUserFunc func(context.Context, *request.UpdateUserReq) (*response.UpdateUserResp, error)
	UpdateSelfFunc func(context.Context, *request.UpdateSelfReq) (*response.UpdateSelfResp, error)
	// contains filtered or unexported fields
}

UsersServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns

func NewUsersServerMock

func NewUsersServerMock() *UsersServerMock

NewUsersServerMock gives you a fresh instance of UsersServerMock.

func NewUsersServerMockWithoutValidation

func NewUsersServerMockWithoutValidation() *UsersServerMock

NewUsersServerMockWithoutValidation gives you a fresh instance of UsersServerMock which does not attempt to validate requests before passing them to their respective '*Func'.

func (*UsersServerMock) CreateUser

func (*UsersServerMock) DeleteUser

func (*UsersServerMock) GetUser

func (*UsersServerMock) GetUsers

func (*UsersServerMock) Reset

func (m *UsersServerMock) Reset()

Reset resets all overridden functions

func (*UsersServerMock) UpdateSelf

func (*UsersServerMock) UpdateUser

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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