user

package
v0.0.0-...-6606c74 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	gormx.BaseFields
	UserName string `json:"username" gorm:"column:name;type:varchar(256);uniqueIndex:udx_org_user"`
	Name     string `json:"name" gorm:"column:name;type:varchar(256);uniqueIndex:udx_org_name"`
	Oid      string `json:"oid" gorm:"column:oid;type:varchar(256);uniqueIndex:udx_org_user;uniqueIndex:udx_org_name"`
}

func (User) TableName

func (User) TableName() string

type UserIdentity

type UserIdentity struct {
	gormx.BaseFields
	Uid      string         `json:"uid" gorm:"column:uid;type:varchar(256)"`
	Oid      string         `json:"oid" gorm:"column:uid;type:varchar(256)"`
	IdpId    string         `json:"idp_id" gorm:"column:idp_id;type:varchar(256)"`
	Identity datatypes.JSON `json:"identity" gorm:"column:identity;not null"`
}

func (UserIdentity) TableName

func (UserIdentity) TableName() string

type UserIdentityRepository

type UserIdentityRepository interface {
	gormx.BaseRepository[UserIdentity]
	FindByUidAndIdpId(context.Context, string, string) (*UserIdentity, error)
	Validate(context.Context, string, func(builder func() *datatypes.JSONQueryExpression) []any) (string, error)
}

type UserRepository

type UserRepository interface {
	gormx.BaseRepository[User]
	FindByOidAndName(string, string) (*User, error)
}

type UserService

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

func NewUserService

func NewUserService() *UserService

func (*UserService) CreateIdentity

func (s *UserService) CreateIdentity(ctx context.Context, oid, uid, idpId string, identityParam map[string]string)

func (*UserService) CreateUser

func (s *UserService) CreateUser(ctx context.Context, u *User)

func (*UserService) FindByOidAndName

func (s *UserService) FindByOidAndName(oid string, name string) (*User, error)

func (*UserService) FindUser

func (s *UserService) FindUser(ctx context.Context, id string) (*User, error)

func (*UserService) Validate

func (s *UserService) Validate(ctx context.Context, oid string, builder func(builder func() *datatypes.JSONQueryExpression) []any) (string, bool)

Jump to

Keyboard shortcuts

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