authn

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

Documentation

Overview

Package authn is a generated GoMock package.

Package authn is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthenticationHandler

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

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

func RegisterAuthenticationHandlerClient

func RegisterAuthenticationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthenticationClient) error

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

func RegisterAuthenticationHandlerFromEndpoint

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

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

func RegisterAuthenticationServer

func RegisterAuthenticationServer(s *grpc.Server, srv AuthenticationServer)

func RegisterTokensMgmtServer

func RegisterTokensMgmtServer(s *grpc.Server, srv TokensMgmtServer)

Types

type AuthenticateRequest

type AuthenticateRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*AuthenticateRequest) Descriptor

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

func (*AuthenticateRequest) ProtoMessage

func (*AuthenticateRequest) ProtoMessage()

func (*AuthenticateRequest) Reset

func (m *AuthenticateRequest) Reset()

func (*AuthenticateRequest) String

func (m *AuthenticateRequest) String() string

func (*AuthenticateRequest) Validate

func (m *AuthenticateRequest) Validate() error

Validate checks the field values on AuthenticateRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*AuthenticateRequest) XXX_DiscardUnknown

func (m *AuthenticateRequest) XXX_DiscardUnknown()

func (*AuthenticateRequest) XXX_Marshal

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

func (*AuthenticateRequest) XXX_Merge

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

func (*AuthenticateRequest) XXX_Size

func (m *AuthenticateRequest) XXX_Size() int

func (*AuthenticateRequest) XXX_Unmarshal

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

type AuthenticateRequestValidationError

type AuthenticateRequestValidationError struct {
	// contains filtered or unexported fields
}

AuthenticateRequestValidationError is the validation error returned by AuthenticateRequest.Validate if the designated constraints aren't met.

func (AuthenticateRequestValidationError) Cause

Cause function returns cause value.

func (AuthenticateRequestValidationError) Error

Error satisfies the builtin error interface

func (AuthenticateRequestValidationError) ErrorName

ErrorName returns error name.

func (AuthenticateRequestValidationError) Field

Field function returns field value.

func (AuthenticateRequestValidationError) Key

Key function returns key value.

func (AuthenticateRequestValidationError) Reason

Reason function returns reason value.

type AuthenticateResponse

type AuthenticateResponse struct {
	// This could be either "user:{local,ldap,saml}:<some-id>",
	// "tls:service:<some-id> or "token:<some-id>",
	// depending on the authentication method that was successful.
	Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty" toml:"subject,omitempty" mapstructure:"subject,omitempty"`
	// Only human users have teams. The teams are provided either by the external
	// IdP (in which case they're extracted from the id_token; TODO), or, for local
	// users, by teams-service (TODO).
	Teams                []string `protobuf:"bytes,2,rep,name=teams,proto3" json:"teams,omitempty" toml:"teams,omitempty" mapstructure:"teams,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*AuthenticateResponse) Descriptor

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

func (*AuthenticateResponse) GetSubject

func (m *AuthenticateResponse) GetSubject() string

func (*AuthenticateResponse) GetTeams

func (m *AuthenticateResponse) GetTeams() []string

func (*AuthenticateResponse) ProtoMessage

func (*AuthenticateResponse) ProtoMessage()

func (*AuthenticateResponse) Reset

func (m *AuthenticateResponse) Reset()

func (*AuthenticateResponse) String

func (m *AuthenticateResponse) String() string

func (*AuthenticateResponse) Validate

func (m *AuthenticateResponse) Validate() error

Validate checks the field values on AuthenticateResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*AuthenticateResponse) XXX_DiscardUnknown

func (m *AuthenticateResponse) XXX_DiscardUnknown()

func (*AuthenticateResponse) XXX_Marshal

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

func (*AuthenticateResponse) XXX_Merge

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

func (*AuthenticateResponse) XXX_Size

func (m *AuthenticateResponse) XXX_Size() int

func (*AuthenticateResponse) XXX_Unmarshal

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

type AuthenticateResponseValidationError

type AuthenticateResponseValidationError struct {
	// contains filtered or unexported fields
}

AuthenticateResponseValidationError is the validation error returned by AuthenticateResponse.Validate if the designated constraints aren't met.

func (AuthenticateResponseValidationError) Cause

Cause function returns cause value.

func (AuthenticateResponseValidationError) Error

Error satisfies the builtin error interface

func (AuthenticateResponseValidationError) ErrorName

ErrorName returns error name.

func (AuthenticateResponseValidationError) Field

Field function returns field value.

func (AuthenticateResponseValidationError) Key

Key function returns key value.

func (AuthenticateResponseValidationError) Reason

Reason function returns reason value.

type AuthenticationClient

type AuthenticationClient interface {
	// Authenticate inspects the request's metadata -- for this, an empty argument
	// is just enough. Getting a response means it was authenticated successfully.
	// If the metadata does not contain what is needed to authenticate the
	// request, or the tokens are wrong, the AuthenticationService will return the
	// corresponding error code, with details in the message.
	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
}

AuthenticationClient is the client API for Authentication service.

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

func NewAuthenticationClient

func NewAuthenticationClient(cc *grpc.ClientConn) AuthenticationClient

type AuthenticationServer

type AuthenticationServer interface {
	// Authenticate inspects the request's metadata -- for this, an empty argument
	// is just enough. Getting a response means it was authenticated successfully.
	// If the metadata does not contain what is needed to authenticate the
	// request, or the tokens are wrong, the AuthenticationService will return the
	// corresponding error code, with details in the message.
	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
}

AuthenticationServer is the server API for Authentication service.

type AuthenticationServerMock

type AuthenticationServerMock struct {
	AuthenticateFunc func(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
	// contains filtered or unexported fields
}

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

func NewAuthenticationServerMock

func NewAuthenticationServerMock() *AuthenticationServerMock

NewAuthenticationServerMock gives you a fresh instance of AuthenticationServerMock.

func NewAuthenticationServerMockWithoutValidation

func NewAuthenticationServerMockWithoutValidation() *AuthenticationServerMock

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

func (*AuthenticationServerMock) Authenticate

func (*AuthenticationServerMock) Reset

func (m *AuthenticationServerMock) Reset()

Reset resets all overridden functions

type CreateTokenReq

type CreateTokenReq struct {
	// Match either a completely empty string or a valid id.
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	Description          string   `` /* 141-byte string literal not displayed */
	Active               bool     `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty" toml:"active,omitempty" mapstructure:"active,omitempty"`
	Projects             []string `` /* 129-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*CreateTokenReq) Descriptor

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

func (*CreateTokenReq) GetActive

func (m *CreateTokenReq) GetActive() bool

func (*CreateTokenReq) GetDescription

func (m *CreateTokenReq) GetDescription() string

func (*CreateTokenReq) GetId

func (m *CreateTokenReq) GetId() string

func (*CreateTokenReq) GetProjects

func (m *CreateTokenReq) GetProjects() []string

func (*CreateTokenReq) ProtoMessage

func (*CreateTokenReq) ProtoMessage()

func (*CreateTokenReq) Reset

func (m *CreateTokenReq) Reset()

func (*CreateTokenReq) String

func (m *CreateTokenReq) String() string

func (*CreateTokenReq) Validate

func (m *CreateTokenReq) Validate() error

Validate checks the field values on CreateTokenReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*CreateTokenReq) XXX_DiscardUnknown

func (m *CreateTokenReq) XXX_DiscardUnknown()

func (*CreateTokenReq) XXX_Marshal

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

func (*CreateTokenReq) XXX_Merge

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

func (*CreateTokenReq) XXX_Size

func (m *CreateTokenReq) XXX_Size() int

func (*CreateTokenReq) XXX_Unmarshal

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

type CreateTokenReqValidationError

type CreateTokenReqValidationError struct {
	// contains filtered or unexported fields
}

CreateTokenReqValidationError is the validation error returned by CreateTokenReq.Validate if the designated constraints aren't met.

func (CreateTokenReqValidationError) Cause

Cause function returns cause value.

func (CreateTokenReqValidationError) Error

Error satisfies the builtin error interface

func (CreateTokenReqValidationError) ErrorName

func (e CreateTokenReqValidationError) ErrorName() string

ErrorName returns error name.

func (CreateTokenReqValidationError) Field

Field function returns field value.

func (CreateTokenReqValidationError) Key

Key function returns key value.

func (CreateTokenReqValidationError) Reason

Reason function returns reason value.

type CreateTokenWithValueReq

type CreateTokenWithValueReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	Description          string   `` /* 141-byte string literal not displayed */
	Active               bool     `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty" toml:"active,omitempty" mapstructure:"active,omitempty"`
	Value                string   `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty" toml:"value,omitempty" mapstructure:"value,omitempty"`
	Projects             []string `` /* 129-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*CreateTokenWithValueReq) Descriptor

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

func (*CreateTokenWithValueReq) GetActive

func (m *CreateTokenWithValueReq) GetActive() bool

func (*CreateTokenWithValueReq) GetDescription

func (m *CreateTokenWithValueReq) GetDescription() string

func (*CreateTokenWithValueReq) GetId

func (m *CreateTokenWithValueReq) GetId() string

func (*CreateTokenWithValueReq) GetProjects

func (m *CreateTokenWithValueReq) GetProjects() []string

func (*CreateTokenWithValueReq) GetValue

func (m *CreateTokenWithValueReq) GetValue() string

func (*CreateTokenWithValueReq) ProtoMessage

func (*CreateTokenWithValueReq) ProtoMessage()

func (*CreateTokenWithValueReq) Reset

func (m *CreateTokenWithValueReq) Reset()

func (*CreateTokenWithValueReq) String

func (m *CreateTokenWithValueReq) String() string

func (*CreateTokenWithValueReq) Validate

func (m *CreateTokenWithValueReq) Validate() error

Validate checks the field values on CreateTokenWithValueReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*CreateTokenWithValueReq) XXX_DiscardUnknown

func (m *CreateTokenWithValueReq) XXX_DiscardUnknown()

func (*CreateTokenWithValueReq) XXX_Marshal

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

func (*CreateTokenWithValueReq) XXX_Merge

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

func (*CreateTokenWithValueReq) XXX_Size

func (m *CreateTokenWithValueReq) XXX_Size() int

func (*CreateTokenWithValueReq) XXX_Unmarshal

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

type CreateTokenWithValueReqValidationError

type CreateTokenWithValueReqValidationError struct {
	// contains filtered or unexported fields
}

CreateTokenWithValueReqValidationError is the validation error returned by CreateTokenWithValueReq.Validate if the designated constraints aren't met.

func (CreateTokenWithValueReqValidationError) Cause

Cause function returns cause value.

func (CreateTokenWithValueReqValidationError) Error

Error satisfies the builtin error interface

func (CreateTokenWithValueReqValidationError) ErrorName

ErrorName returns error name.

func (CreateTokenWithValueReqValidationError) Field

Field function returns field value.

func (CreateTokenWithValueReqValidationError) Key

Key function returns key value.

func (CreateTokenWithValueReqValidationError) Reason

Reason function returns reason value.

type DeleteTokenReq

type DeleteTokenReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*DeleteTokenReq) Descriptor

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

func (*DeleteTokenReq) GetId

func (m *DeleteTokenReq) GetId() string

func (*DeleteTokenReq) ProtoMessage

func (*DeleteTokenReq) ProtoMessage()

func (*DeleteTokenReq) Reset

func (m *DeleteTokenReq) Reset()

func (*DeleteTokenReq) String

func (m *DeleteTokenReq) String() string

func (*DeleteTokenReq) Validate

func (m *DeleteTokenReq) Validate() error

Validate checks the field values on DeleteTokenReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*DeleteTokenReq) XXX_DiscardUnknown

func (m *DeleteTokenReq) XXX_DiscardUnknown()

func (*DeleteTokenReq) XXX_Marshal

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

func (*DeleteTokenReq) XXX_Merge

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

func (*DeleteTokenReq) XXX_Size

func (m *DeleteTokenReq) XXX_Size() int

func (*DeleteTokenReq) XXX_Unmarshal

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

type DeleteTokenReqValidationError

type DeleteTokenReqValidationError struct {
	// contains filtered or unexported fields
}

DeleteTokenReqValidationError is the validation error returned by DeleteTokenReq.Validate if the designated constraints aren't met.

func (DeleteTokenReqValidationError) Cause

Cause function returns cause value.

func (DeleteTokenReqValidationError) Error

Error satisfies the builtin error interface

func (DeleteTokenReqValidationError) ErrorName

func (e DeleteTokenReqValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteTokenReqValidationError) Field

Field function returns field value.

func (DeleteTokenReqValidationError) Key

Key function returns key value.

func (DeleteTokenReqValidationError) Reason

Reason function returns reason value.

type DeleteTokenResp

type DeleteTokenResp struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*DeleteTokenResp) Descriptor

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

func (*DeleteTokenResp) ProtoMessage

func (*DeleteTokenResp) ProtoMessage()

func (*DeleteTokenResp) Reset

func (m *DeleteTokenResp) Reset()

func (*DeleteTokenResp) String

func (m *DeleteTokenResp) String() string

func (*DeleteTokenResp) Validate

func (m *DeleteTokenResp) Validate() error

Validate checks the field values on DeleteTokenResp with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*DeleteTokenResp) XXX_DiscardUnknown

func (m *DeleteTokenResp) XXX_DiscardUnknown()

func (*DeleteTokenResp) XXX_Marshal

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

func (*DeleteTokenResp) XXX_Merge

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

func (*DeleteTokenResp) XXX_Size

func (m *DeleteTokenResp) XXX_Size() int

func (*DeleteTokenResp) XXX_Unmarshal

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

type DeleteTokenRespValidationError

type DeleteTokenRespValidationError struct {
	// contains filtered or unexported fields
}

DeleteTokenRespValidationError is the validation error returned by DeleteTokenResp.Validate if the designated constraints aren't met.

func (DeleteTokenRespValidationError) Cause

Cause function returns cause value.

func (DeleteTokenRespValidationError) Error

Error satisfies the builtin error interface

func (DeleteTokenRespValidationError) ErrorName

func (e DeleteTokenRespValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteTokenRespValidationError) Field

Field function returns field value.

func (DeleteTokenRespValidationError) Key

Key function returns key value.

func (DeleteTokenRespValidationError) Reason

Reason function returns reason value.

type GetTokenReq

type GetTokenReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*GetTokenReq) Descriptor

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

func (*GetTokenReq) GetId

func (m *GetTokenReq) GetId() string

func (*GetTokenReq) ProtoMessage

func (*GetTokenReq) ProtoMessage()

func (*GetTokenReq) Reset

func (m *GetTokenReq) Reset()

func (*GetTokenReq) String

func (m *GetTokenReq) String() string

func (*GetTokenReq) Validate

func (m *GetTokenReq) Validate() error

Validate checks the field values on GetTokenReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*GetTokenReq) XXX_DiscardUnknown

func (m *GetTokenReq) XXX_DiscardUnknown()

func (*GetTokenReq) XXX_Marshal

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

func (*GetTokenReq) XXX_Merge

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

func (*GetTokenReq) XXX_Size

func (m *GetTokenReq) XXX_Size() int

func (*GetTokenReq) XXX_Unmarshal

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

type GetTokenReqValidationError

type GetTokenReqValidationError struct {
	// contains filtered or unexported fields
}

GetTokenReqValidationError is the validation error returned by GetTokenReq.Validate if the designated constraints aren't met.

func (GetTokenReqValidationError) Cause

Cause function returns cause value.

func (GetTokenReqValidationError) Error

Error satisfies the builtin error interface

func (GetTokenReqValidationError) ErrorName

func (e GetTokenReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetTokenReqValidationError) Field

Field function returns field value.

func (GetTokenReqValidationError) Key

Key function returns key value.

func (GetTokenReqValidationError) Reason

Reason function returns reason value.

type GetTokensReq

type GetTokensReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*GetTokensReq) Descriptor

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

func (*GetTokensReq) ProtoMessage

func (*GetTokensReq) ProtoMessage()

func (*GetTokensReq) Reset

func (m *GetTokensReq) Reset()

func (*GetTokensReq) String

func (m *GetTokensReq) String() string

func (*GetTokensReq) Validate

func (m *GetTokensReq) Validate() error

Validate checks the field values on GetTokensReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*GetTokensReq) XXX_DiscardUnknown

func (m *GetTokensReq) XXX_DiscardUnknown()

func (*GetTokensReq) XXX_Marshal

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

func (*GetTokensReq) XXX_Merge

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

func (*GetTokensReq) XXX_Size

func (m *GetTokensReq) XXX_Size() int

func (*GetTokensReq) XXX_Unmarshal

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

type GetTokensReqValidationError

type GetTokensReqValidationError struct {
	// contains filtered or unexported fields
}

GetTokensReqValidationError is the validation error returned by GetTokensReq.Validate if the designated constraints aren't met.

func (GetTokensReqValidationError) Cause

Cause function returns cause value.

func (GetTokensReqValidationError) Error

Error satisfies the builtin error interface

func (GetTokensReqValidationError) ErrorName

func (e GetTokensReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetTokensReqValidationError) Field

Field function returns field value.

func (GetTokensReqValidationError) Key

Key function returns key value.

func (GetTokensReqValidationError) Reason

Reason function returns reason value.

type MockAuthenticationClient

type MockAuthenticationClient struct {
	// contains filtered or unexported fields
}

MockAuthenticationClient is a mock of AuthenticationClient interface

func NewMockAuthenticationClient

func NewMockAuthenticationClient(ctrl *gomock.Controller) *MockAuthenticationClient

NewMockAuthenticationClient creates a new mock instance

func (*MockAuthenticationClient) Authenticate

Authenticate mocks base method

func (*MockAuthenticationClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

type MockAuthenticationClientMockRecorder

type MockAuthenticationClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthenticationClientMockRecorder is the mock recorder for MockAuthenticationClient

func (*MockAuthenticationClientMockRecorder) Authenticate

func (mr *MockAuthenticationClientMockRecorder) Authenticate(ctx, in interface{}, opts ...interface{}) *gomock.Call

Authenticate indicates an expected call of Authenticate

type MockAuthenticationServer

type MockAuthenticationServer struct {
	// contains filtered or unexported fields
}

MockAuthenticationServer is a mock of AuthenticationServer interface

func NewMockAuthenticationServer

func NewMockAuthenticationServer(ctrl *gomock.Controller) *MockAuthenticationServer

NewMockAuthenticationServer creates a new mock instance

func (*MockAuthenticationServer) Authenticate

Authenticate mocks base method

func (*MockAuthenticationServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

type MockAuthenticationServerMockRecorder

type MockAuthenticationServerMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthenticationServerMockRecorder is the mock recorder for MockAuthenticationServer

func (*MockAuthenticationServerMockRecorder) Authenticate

func (mr *MockAuthenticationServerMockRecorder) Authenticate(arg0, arg1 interface{}) *gomock.Call

Authenticate indicates an expected call of Authenticate

type Token

type Token struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	Description          string   `` /* 141-byte string literal not displayed */
	Value                string   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty" toml:"value,omitempty" mapstructure:"value,omitempty"`
	Active               bool     `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty" toml:"active,omitempty" mapstructure:"active,omitempty"`
	Created              string   `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty" toml:"created,omitempty" mapstructure:"created,omitempty"`
	Updated              string   `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty" toml:"updated,omitempty" mapstructure:"updated,omitempty"`
	Projects             []string `` /* 129-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*Token) Descriptor

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

func (*Token) GetActive

func (m *Token) GetActive() bool

func (*Token) GetCreated

func (m *Token) GetCreated() string

func (*Token) GetDescription

func (m *Token) GetDescription() string

func (*Token) GetId

func (m *Token) GetId() string

func (*Token) GetProjects

func (m *Token) GetProjects() []string

func (*Token) GetUpdated

func (m *Token) GetUpdated() string

func (*Token) GetValue

func (m *Token) GetValue() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) String

func (m *Token) String() string

func (*Token) Validate

func (m *Token) Validate() error

Validate checks the field values on Token with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

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

func (*Token) XXX_Merge

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

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

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

type TokenValidationError

type TokenValidationError struct {
	// contains filtered or unexported fields
}

TokenValidationError is the validation error returned by Token.Validate if the designated constraints aren't met.

func (TokenValidationError) Cause

func (e TokenValidationError) Cause() error

Cause function returns cause value.

func (TokenValidationError) Error

func (e TokenValidationError) Error() string

Error satisfies the builtin error interface

func (TokenValidationError) ErrorName

func (e TokenValidationError) ErrorName() string

ErrorName returns error name.

func (TokenValidationError) Field

func (e TokenValidationError) Field() string

Field function returns field value.

func (TokenValidationError) Key

func (e TokenValidationError) Key() bool

Key function returns key value.

func (TokenValidationError) Reason

func (e TokenValidationError) Reason() string

Reason function returns reason value.

type Tokens

type Tokens struct {
	Tokens               []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty" toml:"tokens,omitempty" mapstructure:"tokens,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*Tokens) Descriptor

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

func (*Tokens) GetTokens

func (m *Tokens) GetTokens() []*Token

func (*Tokens) ProtoMessage

func (*Tokens) ProtoMessage()

func (*Tokens) Reset

func (m *Tokens) Reset()

func (*Tokens) String

func (m *Tokens) String() string

func (*Tokens) Validate

func (m *Tokens) Validate() error

Validate checks the field values on Tokens with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Tokens) XXX_DiscardUnknown

func (m *Tokens) XXX_DiscardUnknown()

func (*Tokens) XXX_Marshal

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

func (*Tokens) XXX_Merge

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

func (*Tokens) XXX_Size

func (m *Tokens) XXX_Size() int

func (*Tokens) XXX_Unmarshal

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

type TokensMgmtClient

type TokensMgmtClient interface {
	GetTokens(ctx context.Context, in *GetTokensReq, opts ...grpc.CallOption) (*Tokens, error)
	CreateToken(ctx context.Context, in *CreateTokenReq, opts ...grpc.CallOption) (*Token, error)
	CreateTokenWithValue(ctx context.Context, in *CreateTokenWithValueReq, opts ...grpc.CallOption) (*Token, error)
	UpdateToken(ctx context.Context, in *UpdateTokenReq, opts ...grpc.CallOption) (*Token, error)
	GetToken(ctx context.Context, in *GetTokenReq, opts ...grpc.CallOption) (*Token, error)
	DeleteToken(ctx context.Context, in *DeleteTokenReq, opts ...grpc.CallOption) (*DeleteTokenResp, error)
}

TokensMgmtClient is the client API for TokensMgmt service.

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

func NewTokensMgmtClient

func NewTokensMgmtClient(cc *grpc.ClientConn) TokensMgmtClient

type TokensMgmtServer

type TokensMgmtServer interface {
	GetTokens(context.Context, *GetTokensReq) (*Tokens, error)
	CreateToken(context.Context, *CreateTokenReq) (*Token, error)
	CreateTokenWithValue(context.Context, *CreateTokenWithValueReq) (*Token, error)
	UpdateToken(context.Context, *UpdateTokenReq) (*Token, error)
	GetToken(context.Context, *GetTokenReq) (*Token, error)
	DeleteToken(context.Context, *DeleteTokenReq) (*DeleteTokenResp, error)
}

TokensMgmtServer is the server API for TokensMgmt service.

type TokensMgmtServerMock

type TokensMgmtServerMock struct {
	GetTokensFunc            func(context.Context, *GetTokensReq) (*Tokens, error)
	CreateTokenFunc          func(context.Context, *CreateTokenReq) (*Token, error)
	CreateTokenWithValueFunc func(context.Context, *CreateTokenWithValueReq) (*Token, error)
	UpdateTokenFunc          func(context.Context, *UpdateTokenReq) (*Token, error)
	GetTokenFunc             func(context.Context, *GetTokenReq) (*Token, error)
	DeleteTokenFunc          func(context.Context, *DeleteTokenReq) (*DeleteTokenResp, error)
	// contains filtered or unexported fields
}

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

func NewTokensMgmtServerMock

func NewTokensMgmtServerMock() *TokensMgmtServerMock

NewTokensMgmtServerMock gives you a fresh instance of TokensMgmtServerMock.

func NewTokensMgmtServerMockWithoutValidation

func NewTokensMgmtServerMockWithoutValidation() *TokensMgmtServerMock

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

func (*TokensMgmtServerMock) CreateToken

func (m *TokensMgmtServerMock) CreateToken(ctx context.Context, req *CreateTokenReq) (*Token, error)

func (*TokensMgmtServerMock) CreateTokenWithValue

func (m *TokensMgmtServerMock) CreateTokenWithValue(ctx context.Context, req *CreateTokenWithValueReq) (*Token, error)

func (*TokensMgmtServerMock) DeleteToken

func (*TokensMgmtServerMock) GetToken

func (m *TokensMgmtServerMock) GetToken(ctx context.Context, req *GetTokenReq) (*Token, error)

func (*TokensMgmtServerMock) GetTokens

func (m *TokensMgmtServerMock) GetTokens(ctx context.Context, req *GetTokensReq) (*Tokens, error)

func (*TokensMgmtServerMock) Reset

func (m *TokensMgmtServerMock) Reset()

Reset resets all overridden functions

func (*TokensMgmtServerMock) UpdateToken

func (m *TokensMgmtServerMock) UpdateToken(ctx context.Context, req *UpdateTokenReq) (*Token, error)

type TokensValidationError

type TokensValidationError struct {
	// contains filtered or unexported fields
}

TokensValidationError is the validation error returned by Tokens.Validate if the designated constraints aren't met.

func (TokensValidationError) Cause

func (e TokensValidationError) Cause() error

Cause function returns cause value.

func (TokensValidationError) Error

func (e TokensValidationError) Error() string

Error satisfies the builtin error interface

func (TokensValidationError) ErrorName

func (e TokensValidationError) ErrorName() string

ErrorName returns error name.

func (TokensValidationError) Field

func (e TokensValidationError) Field() string

Field function returns field value.

func (TokensValidationError) Key

func (e TokensValidationError) Key() bool

Key function returns key value.

func (TokensValidationError) Reason

func (e TokensValidationError) Reason() string

Reason function returns reason value.

type UpdateTokenReq

type UpdateTokenReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	Active               bool     `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty" toml:"active,omitempty" mapstructure:"active,omitempty"`
	Description          string   `` /* 141-byte string literal not displayed */
	Projects             []string `` /* 129-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*UpdateTokenReq) Descriptor

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

func (*UpdateTokenReq) GetActive

func (m *UpdateTokenReq) GetActive() bool

func (*UpdateTokenReq) GetDescription

func (m *UpdateTokenReq) GetDescription() string

func (*UpdateTokenReq) GetId

func (m *UpdateTokenReq) GetId() string

func (*UpdateTokenReq) GetProjects

func (m *UpdateTokenReq) GetProjects() []string

func (*UpdateTokenReq) ProtoMessage

func (*UpdateTokenReq) ProtoMessage()

func (*UpdateTokenReq) Reset

func (m *UpdateTokenReq) Reset()

func (*UpdateTokenReq) String

func (m *UpdateTokenReq) String() string

func (*UpdateTokenReq) Validate

func (m *UpdateTokenReq) Validate() error

Validate checks the field values on UpdateTokenReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*UpdateTokenReq) XXX_DiscardUnknown

func (m *UpdateTokenReq) XXX_DiscardUnknown()

func (*UpdateTokenReq) XXX_Marshal

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

func (*UpdateTokenReq) XXX_Merge

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

func (*UpdateTokenReq) XXX_Size

func (m *UpdateTokenReq) XXX_Size() int

func (*UpdateTokenReq) XXX_Unmarshal

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

type UpdateTokenReqValidationError

type UpdateTokenReqValidationError struct {
	// contains filtered or unexported fields
}

UpdateTokenReqValidationError is the validation error returned by UpdateTokenReq.Validate if the designated constraints aren't met.

func (UpdateTokenReqValidationError) Cause

Cause function returns cause value.

func (UpdateTokenReqValidationError) Error

Error satisfies the builtin error interface

func (UpdateTokenReqValidationError) ErrorName

func (e UpdateTokenReqValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateTokenReqValidationError) Field

Field function returns field value.

func (UpdateTokenReqValidationError) Key

Key function returns key value.

func (UpdateTokenReqValidationError) Reason

Reason function returns reason value.

type Value

type Value struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty" toml:"value,omitempty" mapstructure:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

func (*Value) Descriptor

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

func (*Value) GetValue

func (m *Value) GetValue() string

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

func (*Value) Validate

func (m *Value) Validate() error

Validate checks the field values on Value with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Value) XXX_DiscardUnknown

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal

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

func (*Value) XXX_Merge

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

func (*Value) XXX_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

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

type ValueValidationError

type ValueValidationError struct {
	// contains filtered or unexported fields
}

ValueValidationError is the validation error returned by Value.Validate if the designated constraints aren't met.

func (ValueValidationError) Cause

func (e ValueValidationError) Cause() error

Cause function returns cause value.

func (ValueValidationError) Error

func (e ValueValidationError) Error() string

Error satisfies the builtin error interface

func (ValueValidationError) ErrorName

func (e ValueValidationError) ErrorName() string

ErrorName returns error name.

func (ValueValidationError) Field

func (e ValueValidationError) Field() string

Field function returns field value.

func (ValueValidationError) Key

func (e ValueValidationError) Key() bool

Key function returns key value.

func (ValueValidationError) Reason

func (e ValueValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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