Documentation
¶
Index ¶
- type RoleListParamParser
- type RoleService
- func (svc RoleService) Create(ctx context.Context, roleSpec RoleSpec) (*RoleSpec, error)
- func (svc RoleService) DeleteByRoleId(ctx context.Context, roleId string) error
- func (svc RoleService) GetByRoleId(ctx context.Context, roleId string) (*RoleSpec, error)
- func (svc RoleService) List(ctx context.Context, listParams service.ListParams) ([]RoleSpec, error)
- func (svc RoleService) Routes() ([]service.Route, error)
- func (svc RoleService) UpdateByRoleId(ctx context.Context, roleId string, roleSpec UpdateRoleSpec) (*RoleSpec, error)
- type RoleSpec
- type UpdateRoleSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoleListParamParser ¶
type RoleListParamParser struct{}
func (RoleListParamParser) GetDefaultSortBy ¶
func (parser RoleListParamParser) GetDefaultSortBy() string
func (RoleListParamParser) GetSupportedSortBys ¶
func (parser RoleListParamParser) GetSupportedSortBys() []string
func (RoleListParamParser) ParseValue ¶
func (parser RoleListParamParser) ParseValue(val string, sortBy string) (interface{}, error)
type RoleService ¶
type RoleService struct {
service.BaseService
// contains filtered or unexported fields
}
func NewService ¶
func NewService(env service.Env, objectSvc object.Service) *RoleService
func (RoleService) DeleteByRoleId ¶
func (svc RoleService) DeleteByRoleId(ctx context.Context, roleId string) error
func (RoleService) GetByRoleId ¶
func (RoleService) List ¶
func (svc RoleService) List(ctx context.Context, listParams service.ListParams) ([]RoleSpec, error)
func (RoleService) UpdateByRoleId ¶
func (svc RoleService) UpdateByRoleId(ctx context.Context, roleId string, roleSpec UpdateRoleSpec) (*RoleSpec, error)
type RoleSpec ¶
type RoleSpec struct {
RoleId string `json:"roleId" validate:"required,valid_object_id"`
Name *string `json:"name"`
Description *string `json:"description"`
CreatedAt time.Time `json:"createdAt"`
}
func NewRoleSpecFromObjectSpec ¶
func NewRoleSpecFromObjectSpec(objectSpec *object.ObjectSpec) (*RoleSpec, error)
func (RoleSpec) ToCreateObjectSpec ¶
func (spec RoleSpec) ToCreateObjectSpec() (*object.CreateObjectSpec, error)
type UpdateRoleSpec ¶
func (UpdateRoleSpec) ToUpdateObjectSpec ¶
func (updateSpec UpdateRoleSpec) ToUpdateObjectSpec() *object.UpdateObjectSpec
Click to show internal directories.
Click to hide internal directories.