patchy

package module
v0.0.0-...-e2941dc Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

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 Create

func Create[T any](ctx context.Context, a *API, obj *T) (*T, error)

func CreateName

func CreateName[T any](ctx context.Context, a *API, name string, obj *T) (*T, error)

func Delete

func Delete[T any](ctx context.Context, a *API, id string, opts *UpdateOpts) error

func DeleteName

func DeleteName[T any](ctx context.Context, a *API, name, id string, opts *UpdateOpts) error

func FieldChanged

func FieldChanged[T any](obj *T, prev *T, p string) bool

func Find

func Find[T any](ctx context.Context, a *API, shortID string) (*T, error)

func FindName

func FindName[T any](ctx context.Context, a *API, name, shortID string) (*T, error)

func Get

func Get[T any](ctx context.Context, a *API, id string, opts *GetOpts) (*T, error)

func GetName

func GetName[T any](ctx context.Context, a *API, name, id string, opts *GetOpts) (*T, error)

func IsCreate

func IsCreate[T any](obj *T, prev *T) bool

func IsDelete

func IsDelete[T any](obj *T, prev *T) bool

func IsUpdate

func IsUpdate[T any](obj *T, prev *T) bool

func List

func List[T any](ctx context.Context, a *API, opts *ListOpts) ([]*T, error)

func ListName

func ListName[T any](ctx context.Context, a *API, name string, opts *ListOpts) ([]*T, error)

func P

func P[T any](v T) *T

func Register

func Register[T any](a *API)

func RegisterName

func RegisterName[T any](a *API, typeName string)

func Replace

func Replace[T any](ctx context.Context, a *API, id string, obj *T, opts *UpdateOpts) (*T, error)

func ReplaceName

func ReplaceName[T any](ctx context.Context, a *API, name, id string, obj *T, opts *UpdateOpts) (*T, error)

func SetAuthBasic

func SetAuthBasic[T any](a *API, pathUser, pathPass string)

func SetAuthBasicName

func SetAuthBasicName[T any](a *API, name, pathUser, pathPass string)

func SetAuthBearer

func SetAuthBearer[T any](a *API, pathToken string)

func SetAuthBearerName

func SetAuthBearerName[T any](a *API, name, pathToken string)

func SetListHook

func SetListHook[T any](a *API, hook ListHook)

func SetListHookName

func SetListHookName[T any](a *API, name string, hook ListHook)

func Update

func Update[T any](ctx context.Context, a *API, id string, obj *T, opts *UpdateOpts) (*T, error)

func UpdateName

func UpdateName[T any](ctx context.Context, a *API, name, id string, obj *T, opts *UpdateOpts) (*T, error)

Types

type API

type API = api.API

type DebugInfo

type DebugInfo = api.DebugInfo

type Filter

type Filter = api.Filter

type GetOpts

type GetOpts = api.GetOpts

type ListHook

type ListHook = api.ListHook

type ListOpts

type ListOpts = api.ListOpts

type Metadata

type Metadata = api.Metadata

type OpenAPI

type OpenAPI = api.OpenAPI

type OpenAPIInfo

type OpenAPIInfo = api.OpenAPIInfo

type UpdateOpts

type UpdateOpts = api.UpdateOpts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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