admin

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIPath         = "api/kubefox/admin/v1alpha1"
	JSONContentType = "application/json; charset=utf-8"
	TextContentType = "text/plain; charset=utf-8"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action uint8

type Client

type Client interface {
	Ping() (*Response, error)
	Get(uri.URI, any) (*Response, error)
	List(uri.URI) (*Response, error)
	Create(uri.URI, any) (*Response, error)
	Apply(uri.URI, any) (*Response, error)
	Patch(uri.URI, any) (*Response, error)
	Delete(uri.URI) (*Response, error)
}

func NewClient

func NewClient(cfg ClientConfig) Client

type ClientConfig

type ClientConfig struct {
	URL      string
	Timeout  time.Duration
	Insecure bool

	HTTPClient *http.Client

	Log *logger.Log
}

type Response

type Response struct {
	IsError          bool   `json:"isError"`
	Code             int    `json:"code"`
	TraceId          string `json:"traceId,omitempty"`
	Msg              string `json:"msg"`
	Data             any    `json:"data,omitempty"`
	ValidationErrors any    `json:"validationErrors,omitempty"`
}

Jump to

Keyboard shortcuts

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