org

package
v0.0.0-...-58f8293 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

+gengo:operator:register=R +gengo:operator:tag=org

Package org GENERATED BY gengo:enum DON'T EDIT THIS FILE

Package org GENERATED BY gengo:operator DON'T EDIT THIS FILE

Package org GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

View Source
var InvalidType = github_com_pkg_errors.New("invalid Type")

Functions

This section is empty.

Types

type Cookie struct {
	courierhttp.MethodPost `path:"/cookie-ping-pong"`
	Token                  string `name:"token,omitempty" in:"cookie"`
}

func (*Cookie) Output

func (req *Cookie) Output(ctx context.Context) (interface{}, error)

func (Cookie) RuntimeDoc

func (v Cookie) RuntimeDoc(names ...string) ([]string, bool)

type CreateOrg

type CreateOrg struct {
	courierhttp.MethodPost `path:"/orgs"`
	Info                   `in:"body"`
}

创建组织

func (*CreateOrg) Output

func (c *CreateOrg) Output(ctx context.Context) (interface{}, error)

func (*CreateOrg) ResponseContent

func (*CreateOrg) ResponseContent() any

func (CreateOrg) RuntimeDoc

func (v CreateOrg) RuntimeDoc(names ...string) ([]string, bool)

type DataList

type DataList struct {
	Data  []Info `json:"data"`
	Total int    `json:"total"`
	Extra []any  `json:"extra"`
}

func (DataList) RuntimeDoc

func (v DataList) RuntimeDoc(names ...string) ([]string, bool)

type DeleteOrg

type DeleteOrg struct {
	courierhttp.MethodDelete `path:"/orgs/{orgName}"`
	OrgName                  string `name:"orgName" in:"path" `
}

删除组织

func (*DeleteOrg) Output

func (c *DeleteOrg) Output(ctx context.Context) (any, error)

func (*DeleteOrg) ResponseContent

func (*DeleteOrg) ResponseContent() any

func (DeleteOrg) RuntimeDoc

func (v DeleteOrg) RuntimeDoc(names ...string) ([]string, bool)

type Detail

type Detail struct {
	Info
	CreatedAt *time.Time `json:"createdAt,omitempty"`
}

func (Detail) RuntimeDoc

func (v Detail) RuntimeDoc(names ...string) ([]string, bool)

type ErrNotFound

type ErrNotFound struct {
	statuserr.NotFound

	OrgName string
}

func (ErrNotFound) Error

func (e ErrNotFound) Error() string

func (ErrNotFound) RuntimeDoc

func (v ErrNotFound) RuntimeDoc(names ...string) ([]string, bool)

type GetOrg

type GetOrg struct {
	courierhttp.MethodGet `path:"/:orgName"`

	OrgName string `name:"orgName" in:"path" `
}

查询组织信息

func (GetOrg) MiddleOperators

func (GetOrg) MiddleOperators() courier.MiddleOperators

func (*GetOrg) Output

func (c *GetOrg) Output(ctx context.Context) (any, error)

func (*GetOrg) ResponseContent

func (*GetOrg) ResponseContent() any

func (*GetOrg) ResponseErrors

func (*GetOrg) ResponseErrors() []error

func (GetOrg) RuntimeDoc

func (v GetOrg) RuntimeDoc(names ...string) ([]string, bool)

type Info

type Info struct {
	// 组织名称
	Name string `json:"name" validate:"@string[0,5]"`
	// 组织类型
	Type Type `json:"type,omitempty"`
}

组织详情

func (Info) RuntimeDoc

func (v Info) RuntimeDoc(names ...string) ([]string, bool)

type ListOrg

type ListOrg struct {
	courierhttp.MethodGet `path:"/orgs"`
}

拉取组织列表

func (*ListOrg) Output

func (r *ListOrg) Output(ctx context.Context) (any, error)

func (*ListOrg) ResponseContent

func (*ListOrg) ResponseContent() any

func (ListOrg) RuntimeDoc

func (v ListOrg) RuntimeDoc(names ...string) ([]string, bool)

type ListOrgOld

type ListOrgOld struct {
	courierhttp.MethodGet `path:"/org"`
}

拉取组织列表

func (*ListOrgOld) Output

func (r *ListOrgOld) Output(ctx context.Context) (any, error)

func (*ListOrgOld) ResponseStatusCode

func (*ListOrgOld) ResponseStatusCode() int

func (ListOrgOld) RuntimeDoc

func (v ListOrgOld) RuntimeDoc(names ...string) ([]string, bool)

type Type

type Type int

+gengo:enum

const (
	TYPE_UNKNOWN Type = iota

	TYPE__GOV     // 政府
	TYPE__COMPANY // 企事业单位
)

func ParseTypeFromString

func ParseTypeFromString(s string) (Type, error)

func ParseTypeLabelString

func ParseTypeLabelString(label string) (Type, error)

func (Type) EnumValues

func (Type) EnumValues() []any

func (Type) Label

func (v Type) Label() string

func (Type) MarshalText

func (v Type) MarshalText() ([]byte, error)

func (Type) RuntimeDoc

func (Type) RuntimeDoc(names ...string) ([]string, bool)

func (*Type) Scan

func (v *Type) Scan(src any) error

func (Type) String

func (v Type) String() string

func (*Type) UnmarshalText

func (v *Type) UnmarshalText(data []byte) error

func (Type) Value

func (v Type) Value() (database_sql_driver.Value, error)

Directories

Path Synopsis
Package operator GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Package operator GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Jump to

Keyboard shortcuts

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