gateway

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MPL-2.0 Imports: 13 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 []objects.APIDefinition

type Client

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

func NewGatewayClient

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

func (*Client) CreateAPIs added in v1.2.3

func (c *Client) CreateAPIs(apiDefs *[]objects.DBApiDefinition) 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) SyncAPIs added in v1.2.3

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

func (*Client) UpdateAPIs added in v1.2.3

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

Jump to

Keyboard shortcuts

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