Documentation ¶
Index ¶
Constants ¶
View Source
const ( NamespaceKey = "namespace" DefaultNamespaceValue = "global" // TODO: using 'public' GlobalNamespaceValue = "global" )
View Source
const ( PageKey = "page" PageSizeKey = "pageSize" )
Variables ¶
View Source
var ( ErrNotFound = errors.New("no record") ErrNameTooLong = errors.New("name too long") ErrIsExist = errors.New("record existed") ErrNotEmpty = errors.New("group not empty") ErrNoGroup = errors.New("not group") ErrIsGroup = errors.New("this object is a group") ErrNoAccess = errors.New("no access") ErrNoPerm = errors.New("no permission") ErrConflict = errors.New("operation conflict") ErrUnsupported = errors.New("unsupported operation") ErrNotEnable = errors.New("not enable") )
Functions ¶
func WithPagination ¶
func WithPagination(ctx context.Context, page *Pagination) context.Context
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
func GetNamespace ¶
func NewNamespace ¶
type Pagination ¶
func GetPagination ¶
func GetPagination(ctx context.Context) *Pagination
func NewPagination ¶
func NewPagination(page, pageSize int64) *Pagination
func (*Pagination) Limit ¶
func (p *Pagination) Limit() int
func (*Pagination) Offset ¶
func (p *Pagination) Offset() int
Click to show internal directories.
Click to hide internal directories.