apisix

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound         = fmt.Errorf("not found")
	ErrStillInUse       = errors.New("still in use") // We should use force mode
	ErrFunctionDisabled = errors.New("function disabled")
)

Functions

func GetResourceNameOrID

func GetResourceNameOrID(resource interface{}) string

Types

type Client

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

type Cluster

type Cluster interface {
	Route() Route
	Service() Service
}

func NewCluster

func NewCluster(ctx context.Context, url, adminKey string) Cluster

type IntOrString

type IntOrString struct {
	IntValue int `json:"int_value"`
}

IntOrString processing number and string types, after json deserialization will output int

func (*IntOrString) UnmarshalJSON

func (ios *IntOrString) UnmarshalJSON(p []byte) error

type Route

type Route interface {
	Get(ctx context.Context, name string) (*types.Route, error)
	List(ctx context.Context) ([]*types.Route, error)
	Create(ctx context.Context, ups *types.Route) (*types.Route, error)
	Delete(ctx context.Context, name string) error
	Update(ctx context.Context, ups *types.Route) (*types.Route, error)
	Validate(ctx context.Context, resource *types.Route) error
}

type Service

type Service interface {
	Get(ctx context.Context, name string) (*types.Service, error)
	List(ctx context.Context) ([]*types.Service, error)
	Create(ctx context.Context, ups *types.Service) (*types.Service, error)
	Delete(ctx context.Context, name string) error
	Update(ctx context.Context, ups *types.Service) (*types.Service, error)
	Validate(ctx context.Context, resource *types.Service) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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