dashboard

package
v0.6.1-nightly.9f27c62 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XAuthorization = "authorization"
	XContentType   = "content-type"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct{}

func (Api) Create

func (a Api) Create(ctx context.Context, def *model.APIDefinitionSpec) (*model.Result, error)

func (Api) Delete

func (a Api) Delete(ctx context.Context, id string) (*model.Result, error)

func (Api) Get

func (a Api) Get(ctx context.Context, id string) (*model.APIDefinitionSpec, error)

func (Api) List

func (Api) List(
	ctx context.Context,
	options ...model.ListAPIOptions,
) (*model.APIDefinitionSpecList, error)

List list all apis in the dashboard. options controls filtering and sorting

func (Api) Update

func (a Api) Update(ctx context.Context, spec *model.APIDefinitionSpec) (*model.Result, error)

type ApisResponse

type ApisResponse struct {
	Apis  []DashboardApi `json:"apis"`
	Pages int            `json:"pages"`
}

type Catalogue

type Catalogue struct{}

func (Catalogue) Create

func (Catalogue) Get

func (Catalogue) Update

type Cert

type Cert struct{}

func (Cert) All

func (c Cert) All(ctx context.Context) ([]string, error)

All returns a list of all certificates ID's

func (Cert) Delete

func (c Cert) Delete(ctx context.Context, id string) error

func (Cert) Exists

func (c Cert) Exists(ctx context.Context, id string) bool

func (Cert) Upload

func (c Cert) Upload(ctx context.Context, key []byte, crt []byte) (id string, err error)

type CertErrorResponse

type CertErrorResponse struct {
	Status  string `json:"Status"`
	Message string `json:"Message"`
}

type CertResponse

type CertResponse struct {
	Id      string `json:"id"`
	Message string `json:"message"`
	Status  string `json:"status"`
}

type CertificateList

type CertificateList struct {
	CertIDs []string `json:"certs"`
	Pages   int      `json:"pages"`
}

type Client

type Client struct{}

func (Client) Api

func (c Client) Api() universal.Api

func (Client) Certificate

func (c Client) Certificate() universal.Certificate

func (Client) HotReload

func (c Client) HotReload(context.Context) error

func (Client) Portal

func (c Client) Portal() universal.Portal

type DashboardApi

type DashboardApi struct {
	CreatedAt     string                  `json:"created_at,omitempty"`
	ApiDefinition model.APIDefinitionSpec `json:"api_definition"`
}

type Documentation

type Documentation struct{}

func (Documentation) Delete

func (Documentation) Delete(ctx context.Context, id string) (*model.Result, error)

func (Documentation) Upload

type PoliciesResponse

type PoliciesResponse struct {
	Policies []v1.SecurityPolicySpec `json:"data"`
	Pages    int                     `json:"pages"`
}

type Portal

type Portal struct{}

func (Portal) Catalogue

func (Portal) Catalogue() universal.Catalogue

func (Portal) Documentation

func (Portal) Documentation() universal.Documentation

func (Portal) Policy

func (p Portal) Policy() universal.Policy

type ResponseMsg

type ResponseMsg struct {
	Key     string `json:"Key,omitempty"`
	Status  string `json:"Status,omitempty"`
	Action  string `json:"Action,omitempty"`
	Message string `json:"Message,omitempty"`
	Meta    string `json:"Meta,omitempty"`
}

type SecurityPolicy

type SecurityPolicy struct{}

func (SecurityPolicy) All

All Returns all policies from the Dashboard

func (SecurityPolicy) Create

Create creates a new policy using the def object

func (SecurityPolicy) Delete

func (p SecurityPolicy) Delete(ctx context.Context, id string) error

Delete deletes the resource by ID

func (SecurityPolicy) Get

Get find the Policy by id

func (SecurityPolicy) Update

Update updates a resource object def

Jump to

Keyboard shortcuts

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