role

package
v0.0.0-...-3fb8480 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryParam

type QueryParam struct {
	PaginationParam pagination.Param
	OrderFields     pagination.OrderFields
	IDs             []string
	Name            string
	QueryValue      string
	UserID          string
	Status          int
}

type Repository

type Repository interface {
	Query(ctx context.Context, params QueryParam) (Roles, *pagination.Pagination, error)
	Get(ctx context.Context, id string) (*Role, error)
	Create(ctx context.Context, item *Role) error
	Update(ctx context.Context, id string, item *Role) error
	Delete(ctx context.Context, id string) error
	UpdateStatus(ctx context.Context, id string, status int) error
}

type Role

type Role struct {
	ID        string
	Name      string
	Sequence  int
	Memo      *string
	Status    int
	Creator   string
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time
	RoleMenus rolemenu.RoleMenus
}

type Roles

type Roles []*Role

func (Roles) ToMap

func (a Roles) ToMap() map[string]*Role

Jump to

Keyboard shortcuts

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