Documentation ¶
Index ¶
- type ACLPermissionChecker
- type BasicAuthValidator
- type Broker
- type Cache
- func (_m *Cache) Delete(ctx context.Context, key string) error
- func (_m *Cache) Exists(ctx context.Context, key string) (bool, error)
- func (_m *Cache) Get(ctx context.Context, key string) ([]byte, error)
- func (_m *Cache) GetKeys(ctx context.Context, pattern string) ([]string, error)
- func (_m *Cache) GetTTL(ctx context.Context, key string) (time.Duration, error)
- func (_m *Cache) Set(ctx context.Context, key string, value interface{}, expire time.Duration) error
- type Closer
- type GRPCHandler
- type GRPCMiddleware
- func (_m *GRPCMiddleware) GRPCBasicAuth(ctx context.Context) (context.Context, error)
- func (_m *GRPCMiddleware) GRPCBearerAuth(ctx context.Context) (context.Context, error)
- func (_m *GRPCMiddleware) GRPCMultipleAuth(ctx context.Context) (context.Context, error)
- func (_m *GRPCMiddleware) GRPCPermissionACL(permissionCode string) types.MiddlewareFunc
- type GraphQLHandler
- type GraphQLMiddleware
- type HTTPMiddleware
- func (_m *HTTPMiddleware) HTTPBasicAuth(next http.Handler) http.Handler
- func (_m *HTTPMiddleware) HTTPBearerAuth(next http.Handler) http.Handler
- func (_m *HTTPMiddleware) HTTPCache(next http.Handler) http.Handler
- func (_m *HTTPMiddleware) HTTPMultipleAuth(next http.Handler) http.Handler
- func (_m *HTTPMiddleware) HTTPPermissionACL(permissionCode string) func(http.Handler) http.Handler
- type Locker
- type Middleware
- func (_m *Middleware) Basic(ctx context.Context, authKey string) error
- func (_m *Middleware) Bearer(ctx context.Context, token string) (*candishared.TokenClaim, error)
- func (_m *Middleware) GRPCBasicAuth(ctx context.Context) (context.Context, error)
- func (_m *Middleware) GRPCBearerAuth(ctx context.Context) (context.Context, error)
- func (_m *Middleware) GRPCMultipleAuth(ctx context.Context) (context.Context, error)
- func (_m *Middleware) GRPCPermissionACL(permissionCode string) types.MiddlewareFunc
- func (_m *Middleware) GraphQLAuth(ctx context.Context, directive *graphql_gotypes.Directive, input interface{}) (context.Context, error)
- func (_m *Middleware) GraphQLPermissionACL(ctx context.Context, directive *graphql_gotypes.Directive, input interface{}) (context.Context, error)
- func (_m *Middleware) HTTPBasicAuth(next http.Handler) http.Handler
- func (_m *Middleware) HTTPBearerAuth(next http.Handler) http.Handler
- func (_m *Middleware) HTTPCache(next http.Handler) http.Handler
- func (_m *Middleware) HTTPMultipleAuth(next http.Handler) http.Handler
- func (_m *Middleware) HTTPPermissionACL(permissionCode string) func(http.Handler) http.Handler
- type MongoDatabase
- type Publisher
- type RESTHandler
- type RSAKey
- type RedisPool
- type SQLDatabase
- type ServerHandler
- type TokenValidator
- type Tracer
- func (_m *Tracer) Context() context.Context
- func (_m *Tracer) Finish(additionalTags ...map[string]interface{})
- func (_m *Tracer) InjectGRPCMetadata(md metadata.MD)
- func (_m *Tracer) InjectHTTPHeader(req *http.Request)
- func (_m *Tracer) InjectRequestHeader(header map[string]string)
- func (_m *Tracer) Log(key string, value interface{})
- func (_m *Tracer) SetError(err error)
- func (_m *Tracer) SetTag(key string, value interface{})
- func (_m *Tracer) Tags() map[string]interface{}
- type Validator
- type WorkerHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLPermissionChecker ¶
ACLPermissionChecker is an autogenerated mock type for the ACLPermissionChecker type
func NewACLPermissionChecker ¶ added in v1.11.21
func NewACLPermissionChecker(t mockConstructorTestingTNewACLPermissionChecker) *ACLPermissionChecker
NewACLPermissionChecker creates a new instance of ACLPermissionChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*ACLPermissionChecker) CheckPermission ¶
func (_m *ACLPermissionChecker) CheckPermission(ctx context.Context, userID string, permissionCode string) (string, error)
CheckPermission provides a mock function with given fields: ctx, userID, permissionCode
type BasicAuthValidator ¶ added in v1.13.9
BasicAuthValidator is an autogenerated mock type for the BasicAuthValidator type
func NewBasicAuthValidator ¶ added in v1.13.9
func NewBasicAuthValidator(t mockConstructorTestingTNewBasicAuthValidator) *BasicAuthValidator
NewBasicAuthValidator creates a new instance of BasicAuthValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*BasicAuthValidator) ValidateBasic ¶ added in v1.13.9
func (_m *BasicAuthValidator) ValidateBasic(ctx context.Context, username string, password string) error
ValidateBasic provides a mock function with given fields: ctx, username, password
type Broker ¶
Broker is an autogenerated mock type for the Broker type
func NewBroker ¶ added in v1.11.21
func NewBroker(t mockConstructorTestingTNewBroker) *Broker
NewBroker creates a new instance of Broker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Broker) Disconnect ¶
Disconnect provides a mock function with given fields: ctx
func (*Broker) GetConfiguration ¶ added in v1.0.4
func (_m *Broker) GetConfiguration() interface{}
GetConfiguration provides a mock function with given fields:
func (*Broker) GetPublisher ¶ added in v1.7.0
func (_m *Broker) GetPublisher() interfaces.Publisher
GetPublisher provides a mock function with given fields:
type Cache ¶
Cache is an autogenerated mock type for the Cache type
func NewCache ¶ added in v1.11.21
func NewCache(t mockConstructorTestingTNewCache) *Cache
NewCache creates a new instance of Cache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type Closer ¶
Closer is an autogenerated mock type for the Closer type
type GRPCHandler ¶
GRPCHandler is an autogenerated mock type for the GRPCHandler type
func NewGRPCHandler ¶ added in v1.11.21
func NewGRPCHandler(t mockConstructorTestingTNewGRPCHandler) *GRPCHandler
NewGRPCHandler creates a new instance of GRPCHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*GRPCHandler) Register ¶
func (_m *GRPCHandler) Register(server *grpc.Server, middlewareGroup *types.MiddlewareGroup)
Register provides a mock function with given fields: server, middlewareGroup
type GRPCMiddleware ¶
GRPCMiddleware is an autogenerated mock type for the GRPCMiddleware type
func NewGRPCMiddleware ¶ added in v1.11.21
func NewGRPCMiddleware(t mockConstructorTestingTNewGRPCMiddleware) *GRPCMiddleware
NewGRPCMiddleware creates a new instance of GRPCMiddleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*GRPCMiddleware) GRPCBasicAuth ¶
GRPCBasicAuth provides a mock function with given fields: ctx
func (*GRPCMiddleware) GRPCBearerAuth ¶
GRPCBearerAuth provides a mock function with given fields: ctx
func (*GRPCMiddleware) GRPCMultipleAuth ¶ added in v1.14.6
GRPCMultipleAuth provides a mock function with given fields: ctx
func (*GRPCMiddleware) GRPCPermissionACL ¶
func (_m *GRPCMiddleware) GRPCPermissionACL(permissionCode string) types.MiddlewareFunc
GRPCPermissionACL provides a mock function with given fields: permissionCode
type GraphQLHandler ¶
GraphQLHandler is an autogenerated mock type for the GraphQLHandler type
func NewGraphQLHandler ¶ added in v1.11.21
func NewGraphQLHandler(t mockConstructorTestingTNewGraphQLHandler) *GraphQLHandler
NewGraphQLHandler creates a new instance of GraphQLHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*GraphQLHandler) Mutation ¶
func (_m *GraphQLHandler) Mutation() interface{}
Mutation provides a mock function with given fields:
func (*GraphQLHandler) Query ¶
func (_m *GraphQLHandler) Query() interface{}
Query provides a mock function with given fields:
func (*GraphQLHandler) Subscription ¶
func (_m *GraphQLHandler) Subscription() interface{}
Subscription provides a mock function with given fields:
type GraphQLMiddleware ¶
GraphQLMiddleware is an autogenerated mock type for the GraphQLMiddleware type
func NewGraphQLMiddleware ¶ added in v1.11.21
func NewGraphQLMiddleware(t mockConstructorTestingTNewGraphQLMiddleware) *GraphQLMiddleware
NewGraphQLMiddleware creates a new instance of GraphQLMiddleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*GraphQLMiddleware) GraphQLAuth ¶ added in v1.12.1
func (_m *GraphQLMiddleware) GraphQLAuth(ctx context.Context, directive *types.Directive, input interface{}) (context.Context, error)
GraphQLAuth provides a mock function with given fields: ctx, directive, input
func (*GraphQLMiddleware) GraphQLPermissionACL ¶
func (_m *GraphQLMiddleware) GraphQLPermissionACL(ctx context.Context, directive *types.Directive, input interface{}) (context.Context, error)
GraphQLPermissionACL provides a mock function with given fields: ctx, directive, input
type HTTPMiddleware ¶
HTTPMiddleware is an autogenerated mock type for the HTTPMiddleware type
func NewHTTPMiddleware ¶ added in v1.11.21
func NewHTTPMiddleware(t mockConstructorTestingTNewHTTPMiddleware) *HTTPMiddleware
NewHTTPMiddleware creates a new instance of HTTPMiddleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*HTTPMiddleware) HTTPBasicAuth ¶
func (_m *HTTPMiddleware) HTTPBasicAuth(next http.Handler) http.Handler
HTTPBasicAuth provides a mock function with given fields: next
func (*HTTPMiddleware) HTTPBearerAuth ¶
func (_m *HTTPMiddleware) HTTPBearerAuth(next http.Handler) http.Handler
HTTPBearerAuth provides a mock function with given fields: next
func (*HTTPMiddleware) HTTPCache ¶ added in v1.14.6
func (_m *HTTPMiddleware) HTTPCache(next http.Handler) http.Handler
HTTPCache provides a mock function with given fields: next
func (*HTTPMiddleware) HTTPMultipleAuth ¶
func (_m *HTTPMiddleware) HTTPMultipleAuth(next http.Handler) http.Handler
HTTPMultipleAuth provides a mock function with given fields: next
func (*HTTPMiddleware) HTTPPermissionACL ¶
HTTPPermissionACL provides a mock function with given fields: permissionCode
type Locker ¶ added in v1.14.8
Locker is an autogenerated mock type for the Locker type
func NewLocker ¶ added in v1.14.8
func NewLocker(t mockConstructorTestingTNewLocker) *Locker
NewLocker creates a new instance of Locker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Locker) Disconnect ¶ added in v1.14.8
Disconnect provides a mock function with given fields: ctx
func (*Locker) HasBeenLocked ¶ added in v1.14.8
HasBeenLocked provides a mock function with given fields: key
func (*Locker) Lock ¶ added in v1.14.8
Lock provides a mock function with given fields: key, timeout
type Middleware ¶
Middleware is an autogenerated mock type for the Middleware type
func NewMiddleware ¶ added in v1.11.21
func NewMiddleware(t mockConstructorTestingTNewMiddleware) *Middleware
NewMiddleware creates a new instance of Middleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Middleware) Basic ¶
func (_m *Middleware) Basic(ctx context.Context, authKey string) error
Basic provides a mock function with given fields: ctx, authKey
func (*Middleware) Bearer ¶
func (_m *Middleware) Bearer(ctx context.Context, token string) (*candishared.TokenClaim, error)
Bearer provides a mock function with given fields: ctx, token
func (*Middleware) GRPCBasicAuth ¶
GRPCBasicAuth provides a mock function with given fields: ctx
func (*Middleware) GRPCBearerAuth ¶
GRPCBearerAuth provides a mock function with given fields: ctx
func (*Middleware) GRPCMultipleAuth ¶ added in v1.14.6
GRPCMultipleAuth provides a mock function with given fields: ctx
func (*Middleware) GRPCPermissionACL ¶
func (_m *Middleware) GRPCPermissionACL(permissionCode string) types.MiddlewareFunc
GRPCPermissionACL provides a mock function with given fields: permissionCode
func (*Middleware) GraphQLAuth ¶ added in v1.12.1
func (_m *Middleware) GraphQLAuth(ctx context.Context, directive *graphql_gotypes.Directive, input interface{}) (context.Context, error)
GraphQLAuth provides a mock function with given fields: ctx, directive, input
func (*Middleware) GraphQLPermissionACL ¶
func (_m *Middleware) GraphQLPermissionACL(ctx context.Context, directive *graphql_gotypes.Directive, input interface{}) (context.Context, error)
GraphQLPermissionACL provides a mock function with given fields: ctx, directive, input
func (*Middleware) HTTPBasicAuth ¶
func (_m *Middleware) HTTPBasicAuth(next http.Handler) http.Handler
HTTPBasicAuth provides a mock function with given fields: next
func (*Middleware) HTTPBearerAuth ¶
func (_m *Middleware) HTTPBearerAuth(next http.Handler) http.Handler
HTTPBearerAuth provides a mock function with given fields: next
func (*Middleware) HTTPCache ¶ added in v1.14.6
func (_m *Middleware) HTTPCache(next http.Handler) http.Handler
HTTPCache provides a mock function with given fields: next
func (*Middleware) HTTPMultipleAuth ¶
func (_m *Middleware) HTTPMultipleAuth(next http.Handler) http.Handler
HTTPMultipleAuth provides a mock function with given fields: next
func (*Middleware) HTTPPermissionACL ¶
HTTPPermissionACL provides a mock function with given fields: permissionCode
type MongoDatabase ¶
MongoDatabase is an autogenerated mock type for the MongoDatabase type
func NewMongoDatabase ¶ added in v1.11.21
func NewMongoDatabase(t mockConstructorTestingTNewMongoDatabase) *MongoDatabase
NewMongoDatabase creates a new instance of MongoDatabase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MongoDatabase) Disconnect ¶
func (_m *MongoDatabase) Disconnect(ctx context.Context) error
Disconnect provides a mock function with given fields: ctx
func (*MongoDatabase) Health ¶
func (_m *MongoDatabase) Health() map[string]error
Health provides a mock function with given fields:
func (*MongoDatabase) ReadDB ¶
func (_m *MongoDatabase) ReadDB() *mongo.Database
ReadDB provides a mock function with given fields:
func (*MongoDatabase) WriteDB ¶
func (_m *MongoDatabase) WriteDB() *mongo.Database
WriteDB provides a mock function with given fields:
type Publisher ¶
Publisher is an autogenerated mock type for the Publisher type
func NewPublisher ¶ added in v1.11.21
func NewPublisher(t mockConstructorTestingTNewPublisher) *Publisher
NewPublisher creates a new instance of Publisher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Publisher) PublishMessage ¶
func (_m *Publisher) PublishMessage(ctx context.Context, args *candishared.PublisherArgument) error
PublishMessage provides a mock function with given fields: ctx, args
type RESTHandler ¶
RESTHandler is an autogenerated mock type for the RESTHandler type
func NewRESTHandler ¶ added in v1.11.21
func NewRESTHandler(t mockConstructorTestingTNewRESTHandler) *RESTHandler
NewRESTHandler creates a new instance of RESTHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*RESTHandler) Mount ¶
func (_m *RESTHandler) Mount(group *echo.Group)
Mount provides a mock function with given fields: group
type RSAKey ¶
RSAKey is an autogenerated mock type for the RSAKey type
func NewRSAKey ¶ added in v1.11.21
func NewRSAKey(t mockConstructorTestingTNewRSAKey) *RSAKey
NewRSAKey creates a new instance of RSAKey. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*RSAKey) PrivateKey ¶
func (_m *RSAKey) PrivateKey() *rsa.PrivateKey
PrivateKey provides a mock function with given fields:
type RedisPool ¶
RedisPool is an autogenerated mock type for the RedisPool type
func NewRedisPool ¶ added in v1.11.21
func NewRedisPool(t mockConstructorTestingTNewRedisPool) *RedisPool
NewRedisPool creates a new instance of RedisPool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*RedisPool) Cache ¶
func (_m *RedisPool) Cache() interfaces.Cache
Cache provides a mock function with given fields:
func (*RedisPool) Disconnect ¶
Disconnect provides a mock function with given fields: ctx
type SQLDatabase ¶
SQLDatabase is an autogenerated mock type for the SQLDatabase type
func NewSQLDatabase ¶ added in v1.11.21
func NewSQLDatabase(t mockConstructorTestingTNewSQLDatabase) *SQLDatabase
NewSQLDatabase creates a new instance of SQLDatabase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*SQLDatabase) Disconnect ¶
func (_m *SQLDatabase) Disconnect(ctx context.Context) error
Disconnect provides a mock function with given fields: ctx
func (*SQLDatabase) Health ¶
func (_m *SQLDatabase) Health() map[string]error
Health provides a mock function with given fields:
func (*SQLDatabase) ReadDB ¶
func (_m *SQLDatabase) ReadDB() *sql.DB
ReadDB provides a mock function with given fields:
func (*SQLDatabase) WriteDB ¶
func (_m *SQLDatabase) WriteDB() *sql.DB
WriteDB provides a mock function with given fields:
type ServerHandler ¶ added in v1.7.0
ServerHandler is an autogenerated mock type for the ServerHandler type
func NewServerHandler ¶ added in v1.11.21
func NewServerHandler(t mockConstructorTestingTNewServerHandler) *ServerHandler
NewServerHandler creates a new instance of ServerHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*ServerHandler) MountHandlers ¶ added in v1.7.0
func (_m *ServerHandler) MountHandlers(group interface{})
MountHandlers provides a mock function with given fields: group
type TokenValidator ¶
TokenValidator is an autogenerated mock type for the TokenValidator type
func NewTokenValidator ¶ added in v1.11.21
func NewTokenValidator(t mockConstructorTestingTNewTokenValidator) *TokenValidator
NewTokenValidator creates a new instance of TokenValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*TokenValidator) ValidateToken ¶
func (_m *TokenValidator) ValidateToken(ctx context.Context, token string) (*candishared.TokenClaim, error)
ValidateToken provides a mock function with given fields: ctx, token
type Tracer ¶
Tracer is an autogenerated mock type for the Tracer type
func (*Tracer) InjectGRPCMetadata ¶
InjectGRPCMetadata provides a mock function with given fields: md
func (*Tracer) InjectHTTPHeader ¶
InjectHTTPHeader provides a mock function with given fields: req
func (*Tracer) InjectRequestHeader ¶ added in v1.9.3
InjectRequestHeader provides a mock function with given fields: header
type Validator ¶
Validator is an autogenerated mock type for the Validator type
func NewValidator ¶ added in v1.11.21
func NewValidator(t mockConstructorTestingTNewValidator) *Validator
NewValidator creates a new instance of Validator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Validator) ValidateDocument ¶
ValidateDocument provides a mock function with given fields: reference, document
func (*Validator) ValidateStruct ¶
ValidateStruct provides a mock function with given fields: data
type WorkerHandler ¶
WorkerHandler is an autogenerated mock type for the WorkerHandler type
func NewWorkerHandler ¶ added in v1.11.21
func NewWorkerHandler(t mockConstructorTestingTNewWorkerHandler) *WorkerHandler
NewWorkerHandler creates a new instance of WorkerHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*WorkerHandler) MountHandlers ¶
func (_m *WorkerHandler) MountHandlers(group *types.WorkerHandlerGroup)
MountHandlers provides a mock function with given fields: group
Source Files ¶
- ACLPermissionChecker.go
- BasicAuthValidator.go
- Broker.go
- Cache.go
- Closer.go
- GRPCHandler.go
- GRPCMiddleware.go
- GraphQLHandler.go
- GraphQLMiddleware.go
- HTTPMiddleware.go
- Locker.go
- Middleware.go
- MongoDatabase.go
- Publisher.go
- RESTHandler.go
- RSAKey.go
- RedisPool.go
- SQLDatabase.go
- ServerHandler.go
- TokenValidator.go
- Tracer.go
- Validator.go
- WorkerHandler.go