userrole

package
v0.0.0-...-d77c644 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 2 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
	UserID          string
	UserIDs         []string
}

type Repository

type Repository interface {
	Query(ctx context.Context, params QueryParam) (UserRoles, *pagination.Pagination, error)
	Get(ctx context.Context, id string) (*UserRole, error)
	Create(ctx context.Context, item *UserRole) error
	Update(ctx context.Context, id string, item *UserRole) error
	Delete(ctx context.Context, id string) error
	DeleteByUserID(ctx context.Context, userID string) error
}

type UserRole

type UserRole struct {
	ID     string
	UserID string
	RoleID string
}

type UserRoles

type UserRoles []*UserRole

func (UserRoles) ToMap

func (a UserRoles) ToMap() map[string]*UserRole

func (UserRoles) ToRoleIDs

func (a UserRoles) ToRoleIDs() []string

func (UserRoles) ToUserIDMap

func (a UserRoles) ToUserIDMap() map[string]UserRoles

Jump to

Keyboard shortcuts

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