role

package
v0.0.0-...-eecab09 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorCodeAdapterHTTPRole = domainerrors.ErrorCodeAdapter + domainerrors.ErrorCodeAdapterHTTP + domainerrors.ErrorCodeAdapterRole + iota
	ErrorCodeExecuteUsecase
	ErrorCodeBindJSON
	ErrorCodeCopyToInput
	ErrorCodeBindQuery
	ErrorCodeValidateInput
	ErrorCodeBindURI
)

Variables

This section is empty.

Functions

func NewRoleRoutes

func NewRoleRoutes(handler *gin.RouterGroup, u application_role.IService, l pwlogger.Interface)

Types

type CreatedRequest

type CreatedRequest struct {
	Name        string   `json:"name" binding:"required" example:"admin"`
	Description string   `json:"description" binding:"required" example:"this is for admin role"`
	Permissions []string `json:"permissions" binding:"required" example:"read:all,write:all"`
}

type DeletedRequest

type DeletedRequest struct {
	ID string `json:"id" uri:"id" binding:"required"`
}

type DetailGotRequest

type DetailGotRequest struct {
	ID string `json:"id" uri:"id" binding:"required"`
}

type ErrorEvent

type ErrorEvent struct {
	// contains filtered or unexported fields
}

func (ErrorEvent) MarshalZerologObject

func (a ErrorEvent) MarshalZerologObject(e *zerolog.Event)

type ListGotRequest

type ListGotRequest struct {
	Limit      int      `json:"limit" form:"limit" binding:"required"`
	Offset     int      `json:"offset" form:"offset"`
	FilterName string   `json:"filterName" form:"filterName"`
	SortFields []string `json:"sortFields" form:"sortFields"`
	Dir        string   `json:"dir" form:"dir"`
}

type Response

type Response struct {
	ID          string          `json:"id"`
	Name        string          `json:"name"`
	Description string          `json:"description"`
	Permissions []string        `json:"permissions"`
	Users       []user.Response `json:"users"`
	CreatedAt   time.Time       `json:"createdAt"`
	UpdatedAt   time.Time       `json:"updatedAt"`
	DeletedAt   time.Time       `json:"deletedAt"`
}

func NewResponse

func NewResponse(model *application_role.Output) Response

type ResponseList

type ResponseList struct {
	Offset int64      `json:"offset"`
	Limit  int64      `json:"limit"`
	Total  int64      `json:"total"`
	Items  []Response `json:"items"`
}

func NewResponseList

func NewResponseList(modelList *application_role.OutputList) ResponseList

type Routes

type Routes struct {
	// contains filtered or unexported fields
}

type UpdatedRequest

type UpdatedRequest struct {
	Name        string   `json:"name" binding:"required" example:"admin"`
	Description string   `json:"description" binding:"required" example:"this is for admin role"`
	Permissions []string `json:"permissions" binding:"required" example:"read:all,write:all"`
}

Jump to

Keyboard shortcuts

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