service

package
v0.0.0-...-9ee1b77 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

func NewAuthService

func NewAuthService(hasher *helpers.Md5, tokenManager *helpers.JWT, authRepository repository.AuthRepository,
	tokenRepository repository.TokenRepository) *Auth

func (*Auth) AuthWithCredentials

func (s *Auth) AuthWithCredentials(ctx context.Context, req *api.AuthWithCredentialsRequest) (*api.AuthResponseAccessToken, error)

type AuthService

type AuthService interface {
	AuthWithCredentials(ctx context.Context, req *api.AuthWithCredentialsRequest) (*api.AuthResponseAccessToken, error)
}

type Data

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

func NewDataService

func NewDataService(hasher *helpers.Md5, tokenService TokenService, dataRepository repository.DataRepository,
	roleRepository repository.RoleRepository, authRepository repository.AuthRepository) *Data

type Dependencies

type Dependencies struct {
	Repository *repository.Repositories
	Hasher     *helpers.Md5
	JWTManager *helpers.JWT
}

type Role

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

func NewRoleService

func NewRoleService(hasher *helpers.Md5, tokenService TokenService, roleRepository repository.RoleRepository,
	authRepository repository.AuthRepository) *Role

type RoleService

type RoleService interface {
	CreateRoleByAccessToken(ctx context.Context, req *api.CreateRoleByAccessTokenRequest) (*api.CreateRoleResponseByAccessToken, error)
	DeleteRoleByAccessToken(ctx context.Context, req *api.DeleteRoleByAccessTokenRequest) (*api.DeleteRoleResponseByAccessToken, error)
}

type Services

type Services struct {
	AuthService  AuthService
	UserService  UserService
	RoleService  RoleService
	TokenService TokenService
	DataService  DataService
}

func NewServices

func NewServices(deps *Dependencies) *Services

type Token

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

func NewTokenService

func NewTokenService(hasher *helpers.Md5, tokenManager *helpers.JWT) *Token

func (*Token) CheckAccessToken

func (s *Token) CheckAccessToken(accessToken string) (*helpers.Claims, error)

type TokenService

type TokenService interface {
	CheckAccessToken(accessToken string) (*helpers.Claims, error)
}

type User

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

func NewUserService

func NewUserService(hasher *helpers.Md5, tokenService TokenService, userRepository repository.UserRepository,
	authRepository repository.AuthRepository, roleRepository repository.RoleRepository) *User

Jump to

Keyboard shortcuts

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