repository

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Otp

type Otp interface {
	Store(otp v1.Otp) error
	FindByOtp(otp string) v1.Otp
}

Otp Repository operations otp.

type Permission

type Permission interface {
	Store(permission v1.Permission) error
	Get() []v1.Permission
	Delete(permissionName string) error
}

Permission Repository operations permission.

type Resource

type Resource interface {
	Store(resource v1.Resource) error
	Get() []v1.Resource
	GetByName(name string) v1.Resource
	Delete(resourceName string) error
}

Resource Repository operations resource.

type Role

type Role interface {
	Store(role v1.RoleDto) error
	Get() []v1.RoleDto
	GetByName(name string) v1.RoleDto
	Delete(roleName string) error
	Update(name string, permissions []v1.Permission) error
	AppendPermissions(name string, permissions []v1.Permission) error
	RemovePermissions(name string, permissions []v1.Permission) error
}

Role Repository operations role.

type Token

type Token interface {
	Store(token v1.Token) error
	Delete(uid string) error
	Update(token string, refreshToken string, existingToken string) error
	GetByToken(token string) v1.Token
	GetByUID(uid string) v1.Token
}

Token Repository operations token.

type User

type User interface {
	Store(user v1.User) error
	Get() []v1.User
	GetByID(id string) v1.User
	Delete(id string) error
	GetByEmail(email string) v1.User
	GetByPhone(phone string) v1.User
	GetByToken(token string) v1.User
	UpdatePassword(user v1.User) error
	UpdateUserResourcePermissionDto(id string, userResourcePermissionDto v1.UserResourcePermission) error
	AttachCompany(id, companyId string) error
	UpdateStatus(id string, status enums.STATUS) error
	GetUsersByCompanyId(companyId string, status enums.STATUS) []v1.User
	GetUsersCountByCompanyId(companyId string) v1.UsersCount
}

User Repository operations user.

Jump to

Keyboard shortcuts

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