gateway

package
v1.2.2-rc4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MPL-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UseUpdateError error = errors.New("Object seems to exist (same API ID, Listen Path or Slug), use update()")
	UseCreateError error = errors.New("Object does not exist, use create()")
)

Functions

This section is empty.

Types

type APIMessage

type APIMessage struct {
	Key     string `json:"key"`
	Status  string `json:"status"`
	Action  string `json:"action"`
	Message string `json:"message"`
}

type APISList

type APISList []apidef.APIDefinition

type Client

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

func NewGatewayClient

func NewGatewayClient(url, secret string) (*Client, error)

func (*Client) CreateAPI

func (c *Client) CreateAPI(def *objects.DBApiDefinition) (string, error)

func (*Client) CreateCertificate

func (c *Client) CreateCertificate(cert []byte) (string, error)

func (*Client) DeleteAPI

func (c *Client) DeleteAPI(id string) error

func (*Client) FetchAPIs

func (c *Client) FetchAPIs() ([]objects.DBApiDefinition, error)

func (*Client) GetActiveID

func (c *Client) GetActiveID(def *objects.DBApiDefinition) string

func (*Client) Reload

func (c *Client) Reload() error

func (*Client) SetInsecureTLS

func (c *Client) SetInsecureTLS(val bool)

func (*Client) Sync

func (c *Client) Sync(apiDefs []objects.DBApiDefinition) error

func (*Client) UpdateAPI

func (c *Client) UpdateAPI(def *objects.DBApiDefinition) error

Jump to

Keyboard shortcuts

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