permissiongroup

package
v0.0.0-...-55c8b89 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Form

type Form struct {
	Name string `schema:"name"`
}

func (*Form) Validate

func (form *Form) Validate() error

type Group

type Group struct {
	models.AuthItemGroup
}

type QueryParams

type QueryParams struct {
	api.QueryParams
	Name string `schema:"name"`
}

func (*QueryParams) PaginationQueryMods

func (qps *QueryParams) PaginationQueryMods(limit, offset int) []qm.QueryMod

func (*QueryParams) QueryMods

func (qps *QueryParams) QueryMods() (mods []qm.QueryMod)

func (*QueryParams) Validate

func (qps *QueryParams) Validate() error

type Resource

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

func New

func New(service Service) *Resource

func (*Resource) RegisterRoutes

func (r *Resource) RegisterRoutes(router clevergo.IRouter)

type Service

type Service interface {
	Count(ctx context.Context, qps *QueryParams) (count int64, err error)
	Query(ctx context.Context, limit, offset int, qps *QueryParams) (models.AuthItemGroupSlice, error)
	Delete(ctx context.Context, id int) error
	Create(ctx context.Context, form *Form) (models.AuthItemGroup, error)
	Update(ctx context.Context, id int, form *Form) (*models.AuthItemGroup, error)
}

func NewService

func NewService() Service

Jump to

Keyboard shortcuts

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