authz

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 authz is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthorizationHandler

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

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

func RegisterAuthorizationHandlerClient

func RegisterAuthorizationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthorizationClient) error

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

func RegisterAuthorizationHandlerFromEndpoint

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

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

func RegisterAuthorizationServer

func RegisterAuthorizationServer(s *grpc.Server, srv AuthorizationServer)

Types

type AuthorizationClient

AuthorizationClient is the client API for Authorization service.

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

func NewAuthorizationClient

func NewAuthorizationClient(cc *grpc.ClientConn) AuthorizationClient

type AuthorizationServerMock

type AuthorizationServerMock struct {
	GetVersionFunc            func(context.Context, *version.VersionInfoRequest) (*version.VersionInfo, error)
	CreatePolicyFunc          func(context.Context, *request.CreatePolicyReq) (*response.CreatePolicyResp, error)
	ListPoliciesFunc          func(context.Context, *request.ListPoliciesReq) (*response.ListPoliciesResp, error)
	DeletePolicyFunc          func(context.Context, *request.DeletePolicyReq) (*response.DeletePolicyResp, error)
	IntrospectAllFunc         func(context.Context, *request.IntrospectAllReq) (*response.IntrospectResp, error)
	IntrospectSomeFunc        func(context.Context, *request.IntrospectSomeReq) (*response.IntrospectResp, error)
	IntrospectFunc            func(context.Context, *request.IntrospectReq) (*response.IntrospectResp, error)
	IntrospectAllProjectsFunc func(context.Context, *request.IntrospectAllProjectsReq) (*response.IntrospectProjectsResp, error)
	// contains filtered or unexported fields
}

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

func NewAuthorizationServerMock

func NewAuthorizationServerMock() *AuthorizationServerMock

NewAuthorizationServerMock gives you a fresh instance of AuthorizationServerMock.

func NewAuthorizationServerMockWithoutValidation

func NewAuthorizationServerMockWithoutValidation() *AuthorizationServerMock

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

func (*AuthorizationServerMock) CreatePolicy

func (*AuthorizationServerMock) DeletePolicy

func (*AuthorizationServerMock) GetVersion

func (*AuthorizationServerMock) Introspect

func (*AuthorizationServerMock) IntrospectAll

func (*AuthorizationServerMock) IntrospectAllProjects

func (*AuthorizationServerMock) IntrospectSome

func (*AuthorizationServerMock) ListPolicies

func (*AuthorizationServerMock) Reset

func (m *AuthorizationServerMock) Reset()

Reset resets all overridden functions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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