core

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cypher

type Cypher interface {
	Encrypt(data []byte) ([]byte, error)
	Decrypt(data []byte) ([]byte, error)
}

type Hasher

type Hasher interface {
	Hash(value string) string
	Check(a, b string) bool
}

type Role

type Role int64
const (
	RoleAdmin Role = 1
	RoleUser  Role = 2
)

type UseCase

type UseCase[R any, T any] func(R) (T, error)

UseCase is anything that have application domain code.

type UseCaseError

type UseCaseError struct {
	Code   uint16
	Reason string
}

func (UseCaseError) Error added in v0.0.9

func (caseErr UseCaseError) Error() string

type Validator

type Validator func(interface{}) map[string]string

Jump to

Keyboard shortcuts

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