authn

package
v0.0.0-...-837eb61 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 29 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

View Source
var File_interservice_authn_authenticate_proto protoreflect.FileDescriptor
View Source
var File_interservice_authn_tokens_proto protoreflect.FileDescriptor

Functions

func RegisterAuthenticationServiceHandler

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

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

func RegisterAuthenticationServiceHandlerClient

func RegisterAuthenticationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthenticationServiceClient) error

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

func RegisterAuthenticationServiceHandlerFromEndpoint

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

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

func RegisterAuthenticationServiceHandlerServer

func RegisterAuthenticationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthenticationServiceServer) error

RegisterAuthenticationServiceHandlerServer registers the http handlers for service AuthenticationService to "mux". UnaryRPC :call AuthenticationServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterAuthenticationServiceServer

func RegisterAuthenticationServiceServer(s *grpc.Server, srv AuthenticationServiceServer)

func RegisterTokensMgmtServiceServer

func RegisterTokensMgmtServiceServer(s *grpc.Server, srv TokensMgmtServiceServer)

Types

type AuthenticateRequest

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

func (*AuthenticateRequest) Descriptor deprecated

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

Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateRequest) ProtoMessage

func (*AuthenticateRequest) ProtoMessage()

func (*AuthenticateRequest) ProtoReflect

func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message

func (*AuthenticateRequest) Reset

func (x *AuthenticateRequest) Reset()

func (*AuthenticateRequest) String

func (x *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.

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"`
	Requestor string   `` /* 133-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*AuthenticateResponse) Descriptor deprecated

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

Deprecated: Use AuthenticateResponse.ProtoReflect.Descriptor instead.

func (*AuthenticateResponse) GetRequestor

func (x *AuthenticateResponse) GetRequestor() string

func (*AuthenticateResponse) GetSubject

func (x *AuthenticateResponse) GetSubject() string

func (*AuthenticateResponse) GetTeams

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

func (*AuthenticateResponse) ProtoMessage

func (*AuthenticateResponse) ProtoMessage()

func (*AuthenticateResponse) ProtoReflect

func (x *AuthenticateResponse) ProtoReflect() protoreflect.Message

func (*AuthenticateResponse) Reset

func (x *AuthenticateResponse) Reset()

func (*AuthenticateResponse) String

func (x *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.

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 AuthenticationServiceClient

type AuthenticationServiceClient 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)
}

AuthenticationServiceClient is the client API for AuthenticationService service.

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

type AuthenticationServiceServer

type AuthenticationServiceServer 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)
}

AuthenticationServiceServer is the server API for AuthenticationService service.

type AuthenticationServiceServerMock

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

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

func NewAuthenticationServiceServerMock

func NewAuthenticationServiceServerMock() *AuthenticationServiceServerMock

NewAuthenticationServiceServerMock gives you a fresh instance of AuthenticationServiceServerMock.

func NewAuthenticationServiceServerMockWithoutValidation

func NewAuthenticationServiceServerMockWithoutValidation() *AuthenticationServiceServerMock

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

func (*AuthenticationServiceServerMock) Authenticate

func (*AuthenticationServiceServerMock) Reset

Reset resets all overridden functions

type CreateTokenReq

type CreateTokenReq struct {
	Id       string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	Name     string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	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 */
	// contains filtered or unexported fields
}

func (*CreateTokenReq) Descriptor deprecated

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

Deprecated: Use CreateTokenReq.ProtoReflect.Descriptor instead.

func (*CreateTokenReq) GetActive

func (x *CreateTokenReq) GetActive() bool

func (*CreateTokenReq) GetId

func (x *CreateTokenReq) GetId() string

func (*CreateTokenReq) GetName

func (x *CreateTokenReq) GetName() string

func (*CreateTokenReq) GetProjects

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

func (*CreateTokenReq) ProtoMessage

func (*CreateTokenReq) ProtoMessage()

func (*CreateTokenReq) ProtoReflect

func (x *CreateTokenReq) ProtoReflect() protoreflect.Message

func (*CreateTokenReq) Reset

func (x *CreateTokenReq) Reset()

func (*CreateTokenReq) String

func (x *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.

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"`
	Name     string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	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 */
	// contains filtered or unexported fields
}

func (*CreateTokenWithValueReq) Descriptor deprecated

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

Deprecated: Use CreateTokenWithValueReq.ProtoReflect.Descriptor instead.

func (*CreateTokenWithValueReq) GetActive

func (x *CreateTokenWithValueReq) GetActive() bool

func (*CreateTokenWithValueReq) GetId

func (x *CreateTokenWithValueReq) GetId() string

func (*CreateTokenWithValueReq) GetName

func (x *CreateTokenWithValueReq) GetName() string

func (*CreateTokenWithValueReq) GetProjects

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

func (*CreateTokenWithValueReq) GetValue

func (x *CreateTokenWithValueReq) GetValue() string

func (*CreateTokenWithValueReq) ProtoMessage

func (*CreateTokenWithValueReq) ProtoMessage()

func (*CreateTokenWithValueReq) ProtoReflect

func (x *CreateTokenWithValueReq) ProtoReflect() protoreflect.Message

func (*CreateTokenWithValueReq) Reset

func (x *CreateTokenWithValueReq) Reset()

func (*CreateTokenWithValueReq) String

func (x *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.

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"`
	// contains filtered or unexported fields
}

func (*DeleteTokenReq) Descriptor deprecated

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

Deprecated: Use DeleteTokenReq.ProtoReflect.Descriptor instead.

func (*DeleteTokenReq) GetId

func (x *DeleteTokenReq) GetId() string

func (*DeleteTokenReq) ProtoMessage

func (*DeleteTokenReq) ProtoMessage()

func (*DeleteTokenReq) ProtoReflect

func (x *DeleteTokenReq) ProtoReflect() protoreflect.Message

func (*DeleteTokenReq) Reset

func (x *DeleteTokenReq) Reset()

func (*DeleteTokenReq) String

func (x *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.

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 {
	// contains filtered or unexported fields
}

func (*DeleteTokenResp) Descriptor deprecated

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

Deprecated: Use DeleteTokenResp.ProtoReflect.Descriptor instead.

func (*DeleteTokenResp) ProtoMessage

func (*DeleteTokenResp) ProtoMessage()

func (*DeleteTokenResp) ProtoReflect

func (x *DeleteTokenResp) ProtoReflect() protoreflect.Message

func (*DeleteTokenResp) Reset

func (x *DeleteTokenResp) Reset()

func (*DeleteTokenResp) String

func (x *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.

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"`
	// contains filtered or unexported fields
}

func (*GetTokenReq) Descriptor deprecated

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

Deprecated: Use GetTokenReq.ProtoReflect.Descriptor instead.

func (*GetTokenReq) GetId

func (x *GetTokenReq) GetId() string

func (*GetTokenReq) ProtoMessage

func (*GetTokenReq) ProtoMessage()

func (*GetTokenReq) ProtoReflect

func (x *GetTokenReq) ProtoReflect() protoreflect.Message

func (*GetTokenReq) Reset

func (x *GetTokenReq) Reset()

func (*GetTokenReq) String

func (x *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.

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 {
	// contains filtered or unexported fields
}

func (*GetTokensReq) Descriptor deprecated

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

Deprecated: Use GetTokensReq.ProtoReflect.Descriptor instead.

func (*GetTokensReq) ProtoMessage

func (*GetTokensReq) ProtoMessage()

func (*GetTokensReq) ProtoReflect

func (x *GetTokensReq) ProtoReflect() protoreflect.Message

func (*GetTokensReq) Reset

func (x *GetTokensReq) Reset()

func (*GetTokensReq) String

func (x *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.

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 MockAuthenticationServiceClient

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

MockAuthenticationServiceClient is a mock of AuthenticationServiceClient interface

func NewMockAuthenticationServiceClient

func NewMockAuthenticationServiceClient(ctrl *gomock.Controller) *MockAuthenticationServiceClient

NewMockAuthenticationServiceClient creates a new mock instance

func (*MockAuthenticationServiceClient) Authenticate

Authenticate mocks base method

func (*MockAuthenticationServiceClient) EXPECT

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

type MockAuthenticationServiceClientMockRecorder

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

MockAuthenticationServiceClientMockRecorder is the mock recorder for MockAuthenticationServiceClient

func (*MockAuthenticationServiceClientMockRecorder) Authenticate

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

Authenticate indicates an expected call of Authenticate

type MockAuthenticationServiceServer

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

MockAuthenticationServiceServer is a mock of AuthenticationServiceServer interface

func NewMockAuthenticationServiceServer

func NewMockAuthenticationServiceServer(ctrl *gomock.Controller) *MockAuthenticationServiceServer

NewMockAuthenticationServiceServer creates a new mock instance

func (*MockAuthenticationServiceServer) Authenticate

Authenticate mocks base method

func (*MockAuthenticationServiceServer) EXPECT

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

type MockAuthenticationServiceServerMockRecorder

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

MockAuthenticationServiceServerMockRecorder is the mock recorder for MockAuthenticationServiceServer

func (*MockAuthenticationServiceServerMockRecorder) Authenticate

func (mr *MockAuthenticationServiceServerMockRecorder) 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"`
	Name     string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	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 */
	// contains filtered or unexported fields
}

func (*Token) Descriptor deprecated

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

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetActive

func (x *Token) GetActive() bool

func (*Token) GetCreated

func (x *Token) GetCreated() string

func (*Token) GetId

func (x *Token) GetId() string

func (*Token) GetName

func (x *Token) GetName() string

func (*Token) GetProjects

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

func (*Token) GetUpdated

func (x *Token) GetUpdated() string

func (*Token) GetValue

func (x *Token) GetValue() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *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.

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"`
	// contains filtered or unexported fields
}

func (*Tokens) Descriptor deprecated

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

Deprecated: Use Tokens.ProtoReflect.Descriptor instead.

func (*Tokens) GetTokens

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

func (*Tokens) ProtoMessage

func (*Tokens) ProtoMessage()

func (*Tokens) ProtoReflect

func (x *Tokens) ProtoReflect() protoreflect.Message

func (*Tokens) Reset

func (x *Tokens) Reset()

func (*Tokens) String

func (x *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.

type TokensMgmtServiceClient

type TokensMgmtServiceClient 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)
}

TokensMgmtServiceClient is the client API for TokensMgmtService service.

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

type TokensMgmtServiceServer

type TokensMgmtServiceServer 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)
}

TokensMgmtServiceServer is the server API for TokensMgmtService service.

type TokensMgmtServiceServerMock

type TokensMgmtServiceServerMock 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
}

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

func NewTokensMgmtServiceServerMock

func NewTokensMgmtServiceServerMock() *TokensMgmtServiceServerMock

NewTokensMgmtServiceServerMock gives you a fresh instance of TokensMgmtServiceServerMock.

func NewTokensMgmtServiceServerMockWithoutValidation

func NewTokensMgmtServiceServerMockWithoutValidation() *TokensMgmtServiceServerMock

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

func (*TokensMgmtServiceServerMock) CreateToken

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

func (*TokensMgmtServiceServerMock) CreateTokenWithValue

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

func (*TokensMgmtServiceServerMock) DeleteToken

func (*TokensMgmtServiceServerMock) GetToken

func (*TokensMgmtServiceServerMock) GetTokens

func (*TokensMgmtServiceServerMock) Reset

func (m *TokensMgmtServiceServerMock) Reset()

Reset resets all overridden functions

func (*TokensMgmtServiceServerMock) UpdateToken

func (m *TokensMgmtServiceServerMock) 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 UnimplementedAuthenticationServiceServer

type UnimplementedAuthenticationServiceServer struct {
}

UnimplementedAuthenticationServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthenticationServiceServer) Authenticate

type UnimplementedTokensMgmtServiceServer

type UnimplementedTokensMgmtServiceServer struct {
}

UnimplementedTokensMgmtServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedTokensMgmtServiceServer) CreateToken

func (*UnimplementedTokensMgmtServiceServer) CreateTokenWithValue

func (*UnimplementedTokensMgmtServiceServer) DeleteToken

func (*UnimplementedTokensMgmtServiceServer) GetToken

func (*UnimplementedTokensMgmtServiceServer) GetTokens

func (*UnimplementedTokensMgmtServiceServer) UpdateToken

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"`
	Name     string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	Projects []string `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*UpdateTokenReq) Descriptor deprecated

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

Deprecated: Use UpdateTokenReq.ProtoReflect.Descriptor instead.

func (*UpdateTokenReq) GetActive

func (x *UpdateTokenReq) GetActive() bool

func (*UpdateTokenReq) GetId

func (x *UpdateTokenReq) GetId() string

func (*UpdateTokenReq) GetName

func (x *UpdateTokenReq) GetName() string

func (*UpdateTokenReq) GetProjects

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

func (*UpdateTokenReq) ProtoMessage

func (*UpdateTokenReq) ProtoMessage()

func (*UpdateTokenReq) ProtoReflect

func (x *UpdateTokenReq) ProtoReflect() protoreflect.Message

func (*UpdateTokenReq) Reset

func (x *UpdateTokenReq) Reset()

func (*UpdateTokenReq) String

func (x *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.

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"`
	// contains filtered or unexported fields
}

func (*Value) Descriptor deprecated

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

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetValue

func (x *Value) GetValue() string

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

func (x *Value) ProtoReflect() protoreflect.Message

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *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.

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