services

package
v1.0.55 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationService

type AuthorizationService interface {

	// 向用户授权
	Authorize(ctx context.Context, u *rbacdb.UserEntity) error
}

AuthorizationService 授权服务

type PermissionImportService added in v0.0.5

type PermissionImportService interface {
	ImportFromResource(c context.Context) error
}

PermissionImportService ...

type PermissionImportServiceImpl added in v0.0.5

type PermissionImportServiceImpl struct {
	AC          application.Context    //starter:inject("context")
	PermService rbac.PermissionService //starter:inject("#")
	ResPath     string                 //starter:inject("${security.permissions.resource-file-path}")
	// contains filtered or unexported fields
}

PermissionImportServiceImpl ...

func (*PermissionImportServiceImpl) ImportFromResource added in v0.0.5

func (inst *PermissionImportServiceImpl) ImportFromResource(c context.Context) error

ImportFromResource ...

type Verification

type Verification struct {
	Mechanism string
	Code      string
	ToMail    rbac.EmailAddress    // 根据 Mechanism 取值
	ToPhone   rbac.FullPhoneNumber // 根据 Mechanism 取值
}

Verification ... 验证码的相关信息

type VerificationRecord

type VerificationRecord interface {
	Account() string

	// 使用 UserEntity 来保存验证记录
	Read() (*rbacdb.UserEntity, error)

	// 使用 UserEntity 来保存验证记录
	Write(u *rbacdb.UserEntity) error

	Prepare(action string) error
}

VerificationRecord ...

type VerificationService

type VerificationService interface {
	Verify(c context.Context, v *Verification) error

	SendCode(c context.Context, v *Verification) error
}

VerificationService ...

Jump to

Keyboard shortcuts

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