Documentation ¶
Index ¶
- Constants
- type Api
- func (a Api) All(ctx context.Context) ([]tykv1alpha1.APIDefinitionSpec, error)
- func (a Api) Create(ctx context.Context, def *tykv1alpha1.APIDefinitionSpec) error
- func (a Api) Delete(ctx context.Context, id string) error
- func (a Api) Get(ctx context.Context, id string) (*tykv1alpha1.APIDefinitionSpec, error)
- func (a Api) Update(ctx context.Context, def *tykv1alpha1.APIDefinitionSpec) error
- type ApisResponse
- type Cert
- type CertErrorResponse
- type CertResponse
- type CertificateList
- type Client
- func (c *Client) Api() universal_client.UniversalApi
- func (c *Client) Certificate() universal_client.UniversalCertificate
- func (c *Client) HotReload() error
- func (c *Client) Organization() universal_client.UniversalOrganization
- func (c *Client) SecurityPolicy() universal_client.UniversalSecurityPolicy
- func (c *Client) Webhook() universal_client.UniversalWebhook
- type DashboardApi
- type Organization
- type PoliciesResponse
- type ResponseMsg
- type SecurityPolicy
- func (p SecurityPolicy) All(ctx context.Context) ([]v1.SecurityPolicySpec, error)
- func (p SecurityPolicy) Create(ctx context.Context, def *v1.SecurityPolicySpec) error
- func (p SecurityPolicy) Delete(ctx context.Context, id string) error
- func (p SecurityPolicy) Get(ctx context.Context, id string) (*v1.SecurityPolicySpec, error)
- func (p SecurityPolicy) Update(ctx context.Context, def *v1.SecurityPolicySpec) error
- type Webhook
- type WebhookResponse
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 {
*Client
}
func (Api) All ¶
func (a Api) All(ctx context.Context) ([]tykv1alpha1.APIDefinitionSpec, error)
func (Api) Create ¶
func (a Api) Create(ctx context.Context, def *tykv1alpha1.APIDefinitionSpec) error
func (Api) Get ¶
func (a Api) Get(ctx context.Context, id string) (*tykv1alpha1.APIDefinitionSpec, error)
func (Api) Update ¶
func (a Api) Update(ctx context.Context, def *tykv1alpha1.APIDefinitionSpec) error
type ApisResponse ¶
type ApisResponse struct { Apis []DashboardApi `json:"apis"` Pages int `json:"pages"` }
type Cert ¶
type Cert struct {
*Client
}
type CertErrorResponse ¶
type CertResponse ¶
type CertificateList ¶
type Client ¶
type Client struct {
universal_client.Client
}
func (*Client) Api ¶
func (c *Client) Api() universal_client.UniversalApi
func (*Client) Certificate ¶
func (c *Client) Certificate() universal_client.UniversalCertificate
func (*Client) Organization ¶
func (c *Client) Organization() universal_client.UniversalOrganization
func (*Client) SecurityPolicy ¶
func (c *Client) SecurityPolicy() universal_client.UniversalSecurityPolicy
func (*Client) Webhook ¶
func (c *Client) Webhook() universal_client.UniversalWebhook
type DashboardApi ¶
type DashboardApi struct { CreatedAt string `json:"created_at,omitempty"` ApiDefinition v1.APIDefinitionSpec `json:"api_definition"` }
type Organization ¶
type Organization struct {
*Client
}
func (*Organization) GetID ¶
func (o *Organization) GetID() string
type PoliciesResponse ¶
type PoliciesResponse struct { Policies []v1.SecurityPolicySpec `json:"data"` Pages int `json:"pages"` }
type ResponseMsg ¶
type SecurityPolicy ¶
type SecurityPolicy struct {
*Client
}
func (SecurityPolicy) All ¶
func (p SecurityPolicy) All(ctx context.Context) ([]v1.SecurityPolicySpec, error)
All Returns all policies from the Dashboard
func (SecurityPolicy) Create ¶
func (p SecurityPolicy) Create(ctx context.Context, def *v1.SecurityPolicySpec) error
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 ¶
func (p SecurityPolicy) Get(ctx context.Context, id string) (*v1.SecurityPolicySpec, error)
Get find the Policy by id
func (SecurityPolicy) Update ¶
func (p SecurityPolicy) Update(ctx context.Context, def *v1.SecurityPolicySpec) error
Update updates a resource object def
type Webhook ¶
type Webhook struct {
*Client
}
func (Webhook) All ¶
func (w Webhook) All() ([]v1.WebhookSpec, error)
* Returns all webhooks from the Dashboard for this org
func (Webhook) Create ¶
func (w Webhook) Create(def *v1.WebhookSpec) error
Creates a webhook. Overwrites the Webhook "name" with the CRD's namespaced name
func (Webhook) Delete ¶
* Tries to delete a Webhook by first attempting to do a lookup on it. If webhook does not exist, move on, nothing to delete
type WebhookResponse ¶
type WebhookResponse struct { Webhooks []v1.WebhookSpec `json:"hooks"` Pages int `json:"pages"` }
Click to show internal directories.
Click to hide internal directories.