authorize

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthorizerServer

func RegisterAuthorizerServer(s *grpc.Server, srv AuthorizerServer)

Types

type AuthorizeReply

type AuthorizeReply struct {
	IsValid              bool     `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthorizeReply) Descriptor

func (*AuthorizeReply) Descriptor() ([]byte, []int)

func (*AuthorizeReply) GetIsValid

func (m *AuthorizeReply) GetIsValid() bool

func (*AuthorizeReply) ProtoMessage

func (*AuthorizeReply) ProtoMessage()

func (*AuthorizeReply) Reset

func (m *AuthorizeReply) Reset()

func (*AuthorizeReply) String

func (m *AuthorizeReply) String() string

func (*AuthorizeReply) XXX_DiscardUnknown

func (m *AuthorizeReply) XXX_DiscardUnknown()

func (*AuthorizeReply) XXX_Marshal

func (m *AuthorizeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthorizeReply) XXX_Merge

func (dst *AuthorizeReply) XXX_Merge(src proto.Message)

func (*AuthorizeReply) XXX_Size

func (m *AuthorizeReply) XXX_Size() int

func (*AuthorizeReply) XXX_Unmarshal

func (m *AuthorizeReply) XXX_Unmarshal(b []byte) error

type AuthorizerClient

type AuthorizerClient interface {
	Authorize(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*AuthorizeReply, error)
	IsAdmin(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*IsAdminReply, error)
}

AuthorizerClient is the client API for Authorizer service.

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

func NewAuthorizerClient

func NewAuthorizerClient(cc *grpc.ClientConn) AuthorizerClient

type AuthorizerServer

type AuthorizerServer interface {
	Authorize(context.Context, *Identity) (*AuthorizeReply, error)
	IsAdmin(context.Context, *Identity) (*IsAdminReply, error)
}

AuthorizerServer is the server API for Authorizer service.

type Identity added in v0.0.5

type Identity struct {
	// request context
	Route string `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"`
	// user context
	User   string   `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	Email  string   `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Groups []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
	// user context
	ImpersonateEmail     string   `protobuf:"bytes,5,opt,name=impersonate_email,json=impersonateEmail,proto3" json:"impersonate_email,omitempty"`
	ImpersonateGroups    []string `protobuf:"bytes,6,rep,name=impersonate_groups,json=impersonateGroups,proto3" json:"impersonate_groups,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Identity) Descriptor added in v0.0.5

func (*Identity) Descriptor() ([]byte, []int)

func (*Identity) GetEmail added in v0.0.5

func (m *Identity) GetEmail() string

func (*Identity) GetGroups added in v0.0.5

func (m *Identity) GetGroups() []string

func (*Identity) GetImpersonateEmail added in v0.0.5

func (m *Identity) GetImpersonateEmail() string

func (*Identity) GetImpersonateGroups added in v0.0.5

func (m *Identity) GetImpersonateGroups() []string

func (*Identity) GetRoute added in v0.0.5

func (m *Identity) GetRoute() string

func (*Identity) GetUser added in v0.0.5

func (m *Identity) GetUser() string

func (*Identity) ProtoMessage added in v0.0.5

func (*Identity) ProtoMessage()

func (*Identity) Reset added in v0.0.5

func (m *Identity) Reset()

func (*Identity) String added in v0.0.5

func (m *Identity) String() string

func (*Identity) XXX_DiscardUnknown added in v0.0.5

func (m *Identity) XXX_DiscardUnknown()

func (*Identity) XXX_Marshal added in v0.0.5

func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Identity) XXX_Merge added in v0.0.5

func (dst *Identity) XXX_Merge(src proto.Message)

func (*Identity) XXX_Size added in v0.0.5

func (m *Identity) XXX_Size() int

func (*Identity) XXX_Unmarshal added in v0.0.5

func (m *Identity) XXX_Unmarshal(b []byte) error

type IsAdminReply added in v0.0.5

type IsAdminReply struct {
	IsAdmin              bool     `protobuf:"varint,1,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*IsAdminReply) Descriptor added in v0.0.5

func (*IsAdminReply) Descriptor() ([]byte, []int)

func (*IsAdminReply) GetIsAdmin added in v0.0.5

func (m *IsAdminReply) GetIsAdmin() bool

func (*IsAdminReply) ProtoMessage added in v0.0.5

func (*IsAdminReply) ProtoMessage()

func (*IsAdminReply) Reset added in v0.0.5

func (m *IsAdminReply) Reset()

func (*IsAdminReply) String added in v0.0.5

func (m *IsAdminReply) String() string

func (*IsAdminReply) XXX_DiscardUnknown added in v0.0.5

func (m *IsAdminReply) XXX_DiscardUnknown()

func (*IsAdminReply) XXX_Marshal added in v0.0.5

func (m *IsAdminReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IsAdminReply) XXX_Merge added in v0.0.5

func (dst *IsAdminReply) XXX_Merge(src proto.Message)

func (*IsAdminReply) XXX_Size added in v0.0.5

func (m *IsAdminReply) XXX_Size() int

func (*IsAdminReply) XXX_Unmarshal added in v0.0.5

func (m *IsAdminReply) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis
Package mock_authorize is a generated GoMock package.
Package mock_authorize is a generated GoMock package.

Jump to

Keyboard shortcuts

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