utilstest

package
v0.0.0-...-b8fae67 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestFakeID       = "123456"
	TestFakeEmail    = "fulano.souza@email.com"
	TestFakePassword = "9kRo7FmFTQ%c"
	TestFakeJWT      = "" /* 160-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func GetDummyGateway

func GetDummyGateway() *entity.Gateway

func GetDummyOrg

func GetDummyOrg() *entity.Organization

func GetDummyPagination

func GetDummyPagination() entity.Pagination

func GetDummyProxies

func GetDummyProxies(quantity int) (items []entity.Proxy)

func GetDummyProxy

func GetDummyProxy() *entity.Proxy

func GetDummyService

func GetDummyService() *entity.Service

func GetDummyServices

func GetDummyServices(quantity int) (items []entity.Service)

func GetDummyTagOption

func GetDummyTagOption() entity.TagOption

func GetDummyUser

func GetDummyUser() *entity.User

func GetDummyUserAuth

func GetDummyUserAuth() *entity.UserAuthentication

func GetDummyUserAuthWithUser

func GetDummyUserAuthWithUser() *entity.UserAuthentication

func GetDummyUsers

func GetDummyUsers(quantity int) (items []entity.User)

func NewDomainProviderMock

func NewDomainProviderMock[T any]() provider.DataResearcherProvider[T]

Types

type AuthProviderMock

type AuthProviderMock struct {
	mock.Mock
}

func (*AuthProviderMock) SignIn

func (pkg *AuthProviderMock) SignIn(ctx context.Context, email, password string) (item *entity.UserAuthentication, err error)

type DomainProviderMock

type DomainProviderMock[T any] struct {
	mock.Mock
}

func (DomainProviderMock[T]) Get

func (pkg DomainProviderMock[T]) Get(ctx context.Context, gateway *entity.Gateway, nameOrID string) (item *T, err error)

func (DomainProviderMock[T]) List

func (pkg DomainProviderMock[T]) List(ctx context.Context, gateway *entity.Gateway, pagination entity.Pagination, tag entity.TagOption) (items []T, err error)

type GatewayProviderMock

type GatewayProviderMock struct {
	mock.Mock
}

func (*GatewayProviderMock) Get

func (pkg *GatewayProviderMock) Get(ctx context.Context, id string) (item *entity.Gateway, err error)

type OrganizationProviderMock

type OrganizationProviderMock struct {
	mock.Mock
}

func (*OrganizationProviderMock) Get

func (pkg *OrganizationProviderMock) Get(ctx context.Context) (item *entity.Organization, err error)

type ProxyProviderMock

type ProxyProviderMock struct {
	mock.Mock
}

func (*ProxyProviderMock) Get

func (pkg *ProxyProviderMock) Get(ctx context.Context, nameOrID string) (item *entity.Proxy, err error)

func (*ProxyProviderMock) List

func (pkg *ProxyProviderMock) List(ctx context.Context, pagination entity.Pagination, tag entity.TagOption) (items []entity.Proxy, err error)

type UserProviderMock

type UserProviderMock struct {
	mock.Mock
}

func (*UserProviderMock) Get

func (pkg *UserProviderMock) Get(ctx context.Context, nameOrID string) (item *entity.User, err error)

func (*UserProviderMock) GetUserByEmail

func (pkg *UserProviderMock) GetUserByEmail(ctx context.Context, email string) (item *entity.User, err error)

func (*UserProviderMock) List

func (pkg *UserProviderMock) List(ctx context.Context, pagination entity.Pagination) (items []entity.User, err error)

Jump to

Keyboard shortcuts

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