Documentation ¶
Index ¶
- Constants
- Variables
- func Create[T any](ctx context.Context, a *API, obj *T) (*T, error)
- func CreateName[T any](ctx context.Context, a *API, name string, obj *T) (*T, error)
- func Delete[T any](ctx context.Context, a *API, id string, opts *UpdateOpts) error
- func DeleteName[T any](ctx context.Context, a *API, name, id string, opts *UpdateOpts) error
- func FieldChanged[T any](obj *T, prev *T, p string) bool
- func Find[T any](ctx context.Context, a *API, shortID string) (*T, error)
- func FindName[T any](ctx context.Context, a *API, name, shortID string) (*T, error)
- func Get[T any](ctx context.Context, a *API, id string, opts *GetOpts) (*T, error)
- func GetName[T any](ctx context.Context, a *API, name, id string, opts *GetOpts) (*T, error)
- func IsCreate[T any](obj *T, prev *T) bool
- func IsDelete[T any](obj *T, prev *T) bool
- func IsUpdate[T any](obj *T, prev *T) bool
- func List[T any](ctx context.Context, a *API, opts *ListOpts) ([]*T, error)
- func ListName[T any](ctx context.Context, a *API, name string, opts *ListOpts) ([]*T, error)
- func P[T any](v T) *T
- func Register[T any](a *API)
- func RegisterName[T any](a *API, typeName string)
- func Replace[T any](ctx context.Context, a *API, id string, obj *T, opts *UpdateOpts) (*T, error)
- func ReplaceName[T any](ctx context.Context, a *API, name, id string, obj *T, opts *UpdateOpts) (*T, error)
- func SetAuthBasic[T any](a *API, pathUser, pathPass string)
- func SetAuthBasicName[T any](a *API, name, pathUser, pathPass string)
- func SetAuthBearer[T any](a *API, pathToken string)
- func SetAuthBearerName[T any](a *API, name, pathToken string)
- func SetListHook[T any](a *API, hook ListHook)
- func SetListHookName[T any](a *API, name string, hook ListHook)
- func Update[T any](ctx context.Context, a *API, id string, obj *T, opts *UpdateOpts) (*T, error)
- func UpdateName[T any](ctx context.Context, a *API, name, id string, obj *T, opts *UpdateOpts) (*T, error)
- type API
- type DebugInfo
- type Filter
- type GetOpts
- type ListHook
- type ListOpts
- type Metadata
- type OpenAPI
- type OpenAPIInfo
- type UpdateOpts
Constants ¶
View Source
const ( ContextInternal = api.ContextInternal ContextAuthBasic = api.ContextAuthBasic ContextAuthBearer = api.ContextAuthBearer )
Variables ¶
View Source
var ( ErrUnknownAcceptType = api.ErrUnknownAcceptType NewAPI = api.NewAPI )
View Source
var ( ParseAuthorization = header.ParseAuthorization ParseBasic = header.ParseBasic )
Functions ¶
func CreateName ¶
func DeleteName ¶
func FieldChanged ¶
func RegisterName ¶
func ReplaceName ¶
func SetAuthBasic ¶
func SetAuthBasicName ¶
func SetAuthBearer ¶
func SetAuthBearerName ¶
func SetListHook ¶
func UpdateName ¶
Types ¶
type OpenAPIInfo ¶
type OpenAPIInfo = api.OpenAPIInfo
type UpdateOpts ¶
type UpdateOpts = api.UpdateOpts
Click to show internal directories.
Click to hide internal directories.