client

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceTypeConversion

func ResourceTypeConversion(resource string) string

This is added for user friendliness. If a user uses a plural name or misses an underscore, api will still able to work

Types

type AuthError

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

type AuthSuccess

type AuthSuccess struct {
	/* variables */
	TokenType    string `json:"token_type"`
	AccessToken  string `json:"access_token"`
	ExpiresIn    int64  `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
}

type CanaryRelease

type CanaryRelease struct {
	VampService  string            `json:"vampService"`
	Destination  string            `json:"destination"`
	Subset       string            `json:"subset"`
	SubsetLabels map[string]string `json:"subsetLabels"`
}

type Metadata

type Metadata struct {
	Metadata map[string]string `json:"metadata"`
}

type Named

type Named struct {
	Name string `json:"name"`
}

type RestClient

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

func NewRestClient

func NewRestClient(url string, token string, isDebug bool, cert string) *RestClient

func (*RestClient) Apply

func (s *RestClient) Apply(resourceName string, name string, source string, sourceType string, values map[string]string, update bool) (bool, error)

func (*RestClient) Create

func (s *RestClient) Create(resourceName string, name string, source string, sourceType string, values map[string]string) (bool, error)

func (*RestClient) Delete

func (s *RestClient) Delete(resourceName string, name string, values map[string]string) (bool, error)

func (*RestClient) Get

func (s *RestClient) Get(resourceName string, name string, outputFormat string, values map[string]string) (string, error)

func (*RestClient) List

func (s *RestClient) List(resourceName string, outputFormat string, values map[string]string, simple bool) (string, error)

func (*RestClient) Login

func (s *RestClient) Login(username string, password string) (string, error)

func (*RestClient) Update

func (s *RestClient) Update(resourceName string, name string, source string, sourceType string, values map[string]string) (bool, error)

type Route

type Route struct {
	Protocol  string   `json:"protocol"`
	Condition string   `json:"condition,omitempty"`
	Rewrite   string   `json:"rewrite,omitempty"`
	Weights   []Weight `json:"weights"`
}

type VampService

type VampService struct {
	Gateways         []string `json:"gateways"`
	Hosts            []string `json:"hosts"`
	Routes           []Route  `json:"routes"`
	ExposeInternally bool     `json:"exposeInternally"`
}

type Weight

type Weight struct {
	Destination string `json:"destination"`
	Port        int64  `json:"port"`
	Version     string `json:"version"`
	Weight      int64  `json:"weight"`
}

Jump to

Keyboard shortcuts

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