apisix

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 20 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 GetResourceUniqueKey added in v0.2.0

func GetResourceUniqueKey(resource interface{}) string

Types

type Client

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

type Cluster

type Cluster interface {
	Route() Route
	Service() Service
	Consumer() Consumer
	SSL() SSL
	GlobalRule() GlobalRule
	PluginConfig() PluginConfig
	ConsumerGroup() ConsumerGroup
	PluginMetadata() PluginMetadata
	StreamRoute() StreamRoute
	Upstream() Upstream
	Ping() error
	SupportValidate() (bool, error)
	SupportStreamRoute() (bool, error)
}

func NewCluster

func NewCluster(ctx context.Context, conf config.ClientConfig) (Cluster, error)

type Consumer added in v0.2.0

type Consumer interface {
	ResourceClient[types.Consumer]
}

type ConsumerGroup added in v0.2.0

type ConsumerGroup interface {
	ResourceClient[types.ConsumerGroup]
}

type GlobalRule added in v0.2.0

type GlobalRule interface {
	ResourceClient[types.GlobalRule]
}

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 PluginConfig added in v0.2.0

type PluginConfig interface {
	ResourceClient[types.PluginConfig]
}

type PluginMetadata added in v0.2.0

type PluginMetadata interface {
	ResourceClient[types.PluginMetadata]
}

type ResourceClient added in v0.2.0

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

type Route

type Route interface {
	ResourceClient[types.Route]
}

type SSL added in v0.2.0

type SSL interface {
	ResourceClient[types.SSL]
}

type Service

type Service interface {
	ResourceClient[types.Service]
}

type StreamRoute added in v0.4.0

type StreamRoute interface {
	ResourceClient[types.StreamRoute]
}

type Upstream added in v0.4.0

type Upstream interface {
	ResourceClient[types.Upstream]
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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