caches

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelTenant

func DelTenant(ctx context.Context, code string) error

func DoToTenantMap

func DoToTenantMap(tenants ...*tenant.Info) map[string]string

func GetTenant

func GetTenant(ctx context.Context, code string) (*tenant.Info, error)

func GetTenantCodes

func GetTenantCodes(ctx context.Context) ([]string, error)

func GetUserAuthProject

func GetUserAuthProject(ctx context.Context, userID int64) ([]*userDataAuth.Project, error)

读取用户数据权限缓存(通用,ctx不限,但需uid传参)

func InitTenant

func InitTenant(ctx context.Context, tenants ...*tenant.Info) error

func SetTenant

func SetTenant(ctx context.Context, t *tenant.Info) error

Types

type UserOnline

type UserOnline struct {
}

func (*UserOnline) DelUser

func (u *UserOnline) DelUser(ctx context.Context, userID int64) error

func (*UserOnline) SetUser

func (u *UserOnline) SetUser(ctx context.Context, nodeID int64, userID int64) error

Jump to

Keyboard shortcuts

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