domain

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppUserID

type AppUserID struct {
	Value int `validate:"required,gte=0"`
}
var SystemAdminID *AppUserID

func NewAppUserID

func NewAppUserID(value int) (*AppUserID, error)

func (*AppUserID) Int

func (v *AppUserID) Int() int

func (*AppUserID) IsAppUserID

func (v *AppUserID) IsAppUserID() bool

type AppUserModel

type AppUserModel struct {
	*libdomain.BaseModel
	AppUserID      *AppUserID
	OrganizationID *OrganizationID
	LoginID        string `validate:"required"`
	Username       string `validate:"required"`
	UserGroups     []*UserGroupModel
}

func NewAppUserModel

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

type OrganizationID

type OrganizationID struct {
	Value int `validate:"required,gte=1"`
}

func NewOrganizationID

func NewOrganizationID(value int) (*OrganizationID, error)

func (*OrganizationID) Int

func (v *OrganizationID) Int() int

func (*OrganizationID) IsOrganizationID

func (v *OrganizationID) IsOrganizationID() bool

type OrganizationModel

type OrganizationModel struct {
	*libdomain.BaseModel
	OrganizationID *OrganizationID
	Name           string `validate:"required"`
}

func NewOrganizationModel

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

type OwnerModel

type OwnerModel struct {
	*AppUserModel
}

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 struct {
	AppUserID *AppUserID
}

func NewSystemAdminModel

func NewSystemAdminModel() *SystemAdminModel

type SystemOwnerModel

type SystemOwnerModel struct {
	*OwnerModel
}

func NewSystemOwnerModel

func NewSystemOwnerModel(appUser *OwnerModel) (*SystemOwnerModel, error)

type UserGroupID

type UserGroupID struct {
	Value int
}

func NewUserGroupID

func NewUserGroupID(value int) (*UserGroupID, error)

func (*UserGroupID) Int

func (v *UserGroupID) Int() int

func (*UserGroupID) IsUserGroupID

func (v *UserGroupID) IsUserGroupID() bool

type UserGroupModel

type UserGroupModel struct {
	*libdomain.BaseModel
	UserGroupID    *UserGroupID
	OrganizationID *OrganizationID
	Key            string `validate:"required"`
	Name           string `validate:"required"`
	Description    string
}

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