Documentation
¶
Index ¶
- type CreateRoleInput
- type Role
- type RoleHandler
- func (uh *RoleHandler) Create(w http.ResponseWriter, r *http.Request)
- func (uh *RoleHandler) Delete(w http.ResponseWriter, r *http.Request)
- func (uh *RoleHandler) GetMany(w http.ResponseWriter, r *http.Request)
- func (uh *RoleHandler) GetOne(w http.ResponseWriter, r *http.Request)
- func (uh *RoleHandler) Update(w http.ResponseWriter, r *http.Request)
- type RoleOutput
- type RoleRepository
- func (rr *RoleRepository) Create(ctx context.Context, role *Role) (*Role, error)
- func (rr *RoleRepository) Delete(ctx context.Context, id int) error
- func (rr *RoleRepository) GetMany(ctx context.Context) ([]*Role, error)
- func (rr *RoleRepository) GetManyById(ctx context.Context, ids []int) ([]*Role, error)
- func (rr *RoleRepository) GetOne(ctx context.Context, id int) (*Role, error)
- func (rr *RoleRepository) Update(ctx context.Context, role *Role) (*Role, error)
- type RoleService
- func (rs *RoleService) Create(ctx context.Context, role *Role) (*Role, error)
- func (rs *RoleService) Delete(ctx context.Context, id int) error
- func (rs *RoleService) GetMany(ctx context.Context) ([]*Role, error)
- func (rs *RoleService) GetManyById(ctx context.Context, ids []int) ([]*Role, error)
- func (rs *RoleService) GetOne(ctx context.Context, id int) (*Role, error)
- func (rs *RoleService) Update(ctx context.Context, role *Role) (*Role, error)
- type UpdateRoleInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRoleInput ¶
type CreateRoleInput struct {
Name string `json:"name"`
}
func (*CreateRoleInput) Role ¶
func (cu *CreateRoleInput) Role() *Role
type RoleHandler ¶
type RoleHandler struct {
// contains filtered or unexported fields
}
func NewRoleHandler ¶
func NewRoleHandler(roleService *RoleService) *RoleHandler
func (*RoleHandler) Create ¶
func (uh *RoleHandler) Create(w http.ResponseWriter, r *http.Request)
func (*RoleHandler) Delete ¶
func (uh *RoleHandler) Delete(w http.ResponseWriter, r *http.Request)
func (*RoleHandler) GetMany ¶
func (uh *RoleHandler) GetMany(w http.ResponseWriter, r *http.Request)
func (*RoleHandler) GetOne ¶
func (uh *RoleHandler) GetOne(w http.ResponseWriter, r *http.Request)
func (*RoleHandler) Update ¶
func (uh *RoleHandler) Update(w http.ResponseWriter, r *http.Request)
type RoleOutput ¶
func NewRoleOutput ¶
func NewRoleOutput(role *Role) *RoleOutput
type RoleRepository ¶
type RoleRepository struct {
// contains filtered or unexported fields
}
func NewRoleRepository ¶
func NewRoleRepository(dbPath string) *RoleRepository
func (*RoleRepository) GetMany ¶
func (rr *RoleRepository) GetMany(ctx context.Context) ([]*Role, error)
func (*RoleRepository) GetManyById ¶
type RoleService ¶
type RoleService struct {
// contains filtered or unexported fields
}
func NewRoleService ¶
func NewRoleService(repo *RoleRepository) *RoleService
func (*RoleService) GetManyById ¶
type UpdateRoleInput ¶
func (*UpdateRoleInput) Role ¶
func (cu *UpdateRoleInput) Role() *Role
Click to show internal directories.
Click to hide internal directories.