domain

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 3 Imported by: 8

Documentation

Index

Constants

View Source
const SystemOwnerID = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type AppUserID

type AppUserID interface {
	Int() int
	IsAppUserID() bool
}
var SystemAdminID AppUserID

func NewAppUserID

func NewAppUserID(value int) (AppUserID, error)

type AppUserModel

type AppUserModel interface {
	libdomain.BaseModel
	GetAppUserID() AppUserID
	GetOrganizationID() OrganizationID
	GetLoginID() string
	GetUsername() string
	GetUserGroups() []UserGroupModel
}

func NewAppUserModel

func NewAppUserModel(baseModel libdomain.BaseModel, appUserID AppUserID, organizationID OrganizationID, loginID, username string, userGroups []UserGroupModel) (AppUserModel, error)

type OrganizationID

type OrganizationID interface {
	Int() int
	IsOrganizationID() bool
}

func NewOrganizationID

func NewOrganizationID(value int) (OrganizationID, error)

type OrganizationModel

type OrganizationModel interface {
	libdomain.BaseModel
	GetID() OrganizationID
	GetName() string
}

func NewOrganizationModel

func NewOrganizationModel(basemodel libdomain.BaseModel, organizationID OrganizationID, name string) (OrganizationModel, error)

type OwnerModel

type OwnerModel interface {
	AppUserModel
	IsOwnerModel() bool
}

func NewOwnerModel

func NewOwnerModel(appUser AppUserModel) (OwnerModel, error)

type RBACAction

type RBACAction interface {
	Action() string
}

func NewRBACAction

func NewRBACAction(value string) RBACAction

type RBACDomain

type RBACDomain interface {
	Domain() string
}

func NewRBACDomain

func NewRBACDomain(value string) RBACDomain

type RBACEffect

type RBACEffect interface {
	Effect() string
}

func NewRBACEffect

func NewRBACEffect(value string) RBACEffect

type RBACObject

type RBACObject interface {
	Object() string
}

func NewRBACObject

func NewRBACObject(value string) RBACObject

type RBACRole

type RBACRole interface {
	RBACSubject
	Role() string
}

func NewRBACRole

func NewRBACRole(value string) RBACRole

type RBACSubject

type RBACSubject interface {
	Subject() string
}

type RBACUser

type RBACUser interface {
	RBACSubject
}

func NewRBACUser

func NewRBACUser(value string) RBACUser

type SystemAdminModel

type SystemAdminModel interface {
	GetAppUserID() AppUserID
	IsSystemAdminModel() bool
}

func NewSystemAdminModel

func NewSystemAdminModel() SystemAdminModel

type SystemOwnerModel

type SystemOwnerModel interface {
	OwnerModel
	IsSystemOwnerModel() bool
}

func NewSystemOwnerModel

func NewSystemOwnerModel(appUser OwnerModel) (SystemOwnerModel, error)

type UserGroupID

type UserGroupID interface {
	Int() int
	IsUserGroupID() bool
}

func NewUserGroupID

func NewUserGroupID(value int) (UserGroupID, error)

type UserGroupModel

type UserGroupModel interface {
	libdomain.BaseModel
	GetUerGroupID() UserGroupID
	GetOrganizationID() OrganizationID
	GetKey() string
	GetName() string
	GetDescription() string
	IsSystemGroup() bool
}

func NewUserGroupModel

func NewUserGroupModel(baseModel libdomain.BaseModel, userGroupID UserGroupID, organizationID OrganizationID, key, name, description string) (UserGroupModel, error)

NewUserGroupModel returns a new UserGroupModel

Jump to

Keyboard shortcuts

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