object

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PermissionListParamParser

type PermissionListParamParser struct{}

func (PermissionListParamParser) GetDefaultSortBy

func (parser PermissionListParamParser) GetDefaultSortBy() string

func (PermissionListParamParser) GetSupportedSortBys

func (parser PermissionListParamParser) GetSupportedSortBys() []string

func (PermissionListParamParser) ParseValue

func (parser PermissionListParamParser) ParseValue(val string, sortBy string) (interface{}, error)

type PermissionService

type PermissionService struct {
	service.BaseService
	// contains filtered or unexported fields
}

func NewService

func NewService(env service.Env, objectSvc object.Service) *PermissionService

func (PermissionService) Create

func (svc PermissionService) Create(ctx context.Context, permissionSpec PermissionSpec) (*PermissionSpec, error)

func (PermissionService) DeleteByPermissionId

func (svc PermissionService) DeleteByPermissionId(ctx context.Context, permissionId string) error

func (PermissionService) GetByPermissionId

func (svc PermissionService) GetByPermissionId(ctx context.Context, permissionId string) (*PermissionSpec, error)

func (PermissionService) List

func (svc PermissionService) List(ctx context.Context, listParams service.ListParams) ([]PermissionSpec, error)

func (PermissionService) Routes

func (svc PermissionService) Routes() ([]service.Route, error)

func (PermissionService) UpdateByPermissionId

func (svc PermissionService) UpdateByPermissionId(ctx context.Context, permissionId string, permissionSpec UpdatePermissionSpec) (*PermissionSpec, error)

type PermissionSpec

type PermissionSpec struct {
	PermissionId string    `json:"permissionId" validate:"required,valid_object_id"`
	Name         *string   `json:"name"`
	Description  *string   `json:"description"`
	CreatedAt    time.Time `json:"createdAt"`
}

func NewPermissionSpecFromObjectSpec

func NewPermissionSpecFromObjectSpec(objectSpec *object.ObjectSpec) (*PermissionSpec, error)

func (PermissionSpec) ToCreateObjectSpec

func (spec PermissionSpec) ToCreateObjectSpec() (*object.CreateObjectSpec, error)

type UpdatePermissionSpec

type UpdatePermissionSpec struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`
}

func (UpdatePermissionSpec) ToUpdateObjectSpec

func (updateSpec UpdatePermissionSpec) ToUpdateObjectSpec() *object.UpdateObjectSpec

Jump to

Keyboard shortcuts

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