Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetResourceUniqueKey ¶ added in v0.2.0
func GetResourceUniqueKey(resource interface{}) string
Types ¶
type Cluster ¶
type Cluster interface {
Route() Route
Service() Service
Consumer() Consumer
SSL() SSL
GlobalRule() GlobalRule
PluginConfig() PluginConfig
ConsumerGroup() ConsumerGroup
PluginMetadata() PluginMetadata
}
func NewCluster ¶
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]
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.