client

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

type ApiError struct {
	Title string
	Msg   string
}

func (*ApiError) String

func (e *ApiError) String() string

type ApiParameter added in v0.2.7

type ApiParameter struct {
	ApiKey      string
	BaseUrl     string
	Debug       bool
	Key         string
	Cert        string
	Cacert      string
	CdkUser     string
	CdkPassword string
	AuthMode    string
	Insecure    bool
}

type AuthMethod added in v0.3.3

type AuthMethod interface {
	AuthorizationHeader() string
}

type BasicAuth added in v0.3.3

type BasicAuth struct {
	Username string
	Password string
}

func (BasicAuth) AuthorizationHeader added in v0.3.3

func (t BasicAuth) AuthorizationHeader() string

type BearerToken added in v0.3.3

type BearerToken struct {
	Token string
}

func (BearerToken) AuthorizationHeader added in v0.3.3

func (t BearerToken) AuthorizationHeader() string

type Client

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

func Make

func Make(apiParameter ApiParameter) (*Client, error)

func MakeFromEnv

func MakeFromEnv() (*Client, error)

func (*Client) ActivateDebug

func (client *Client) ActivateDebug()

func (*Client) Apply

func (client *Client) Apply(resource *resource.Resource, dryMode bool) (string, error)

func (*Client) CreateAdminToken added in v0.2.7

func (client *Client) CreateAdminToken(name string) (CreatedToken, error)

func (*Client) CreateApplicationInstanceToken added in v0.2.7

func (client *Client) CreateApplicationInstanceToken(applicationInstanceName, name string) (CreatedToken, error)

func (*Client) Delete

func (client *Client) Delete(kind *schema.Kind, parentPathValue []string, parentQueryValue []string, name string) error

func (*Client) DeleteResource added in v0.2.7

func (client *Client) DeleteResource(resource *resource.Resource) error

func (*Client) DeleteToken added in v0.2.7

func (client *Client) DeleteToken(uuid string) error

func (*Client) Describe

func (client *Client) Describe(kind *schema.Kind, parentPathValue []string, parentQueryValue []string, name string) (resource.Resource, error)

func (*Client) ExecuteSql added in v0.3.1

func (client *Client) ExecuteSql(maxLine int, sql string) (SqlResult, error)

func (*Client) Get

func (client *Client) Get(kind *schema.Kind, parentPathValue []string, parentQueryValue []string, queryParams map[string]string) ([]resource.Resource, error)

func (*Client) GetKinds

func (client *Client) GetKinds() schema.KindCatalog

func (*Client) GetOpenApi

func (client *Client) GetOpenApi() ([]byte, error)

func (*Client) IgnoreUntrustedCertificate

func (c *Client) IgnoreUntrustedCertificate()

func (*Client) ListAdminToken added in v0.2.7

func (client *Client) ListAdminToken() ([]Token, error)

func (*Client) ListApplicationInstanceToken added in v0.2.7

func (client *Client) ListApplicationInstanceToken(applicationInstanceName string) ([]Token, error)

func (*Client) Login added in v0.2.7

func (client *Client) Login(username, password string) (LoginResult, error)

func (*Client) SetApiKey added in v0.2.7

func (c *Client) SetApiKey(apiKey string)

type CreatedToken added in v0.2.7

type CreatedToken struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	CreatedAt string `json:"createdAt"`
	Token     string `json:"token"`
}

type DeleteInterceptorPayload added in v0.3.0

type DeleteInterceptorPayload struct {
	VCluster *string `json:"vCluster"`
	Group    *string `json:"group"`
	Username *string `json:"username"`
}

type GatewayApiParameter added in v0.3.0

type GatewayApiParameter struct {
	BaseUrl            string
	Debug              bool
	CdkGatewayUser     string
	CdkGatewayPassword string
}

type GatewayClient added in v0.3.0

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

func MakeGateway added in v0.3.0

func MakeGateway(apiParameter GatewayApiParameter) (*GatewayClient, error)

func MakeGatewayClientFromEnv added in v0.3.0

func MakeGatewayClientFromEnv() (*GatewayClient, error)

func (*GatewayClient) ActivateDebug added in v0.3.0

func (client *GatewayClient) ActivateDebug()

func (*GatewayClient) Apply added in v0.3.0

func (client *GatewayClient) Apply(resource *resource.Resource, dryMode bool) (string, error)

func (*GatewayClient) Delete added in v0.3.0

func (client *GatewayClient) Delete(kind *schema.Kind, parentPathValue []string, parentQueryValue []string, name string) error

func (*GatewayClient) DeleteInterceptor added in v0.3.0

func (client *GatewayClient) DeleteInterceptor(kind *schema.Kind, name string, param map[string]string) error

func (*GatewayClient) DeleteKindByNameAndVCluster added in v0.3.0

func (client *GatewayClient) DeleteKindByNameAndVCluster(kind *schema.Kind, param map[string]string) error

func (*GatewayClient) DeleteResourceByName added in v0.3.0

func (client *GatewayClient) DeleteResourceByName(resource *resource.Resource) error

func (*GatewayClient) DeleteResourceByNameAndVCluster added in v0.3.0

func (client *GatewayClient) DeleteResourceByNameAndVCluster(resource *resource.Resource) error

func (*GatewayClient) DeleteResourceInterceptors added in v0.3.0

func (client *GatewayClient) DeleteResourceInterceptors(resource *resource.Resource) error

func (*GatewayClient) Describe added in v0.3.0

func (client *GatewayClient) Describe(kind *schema.Kind, parentPathValue []string, parentQueryValue []string, name string) (resource.Resource, error)

func (*GatewayClient) Get added in v0.3.0

func (client *GatewayClient) Get(kind *schema.Kind, parentPathValue []string, parentQueryValue []string, queryParams map[string]string) ([]resource.Resource, error)

func (*GatewayClient) GetKinds added in v0.3.0

func (client *GatewayClient) GetKinds() schema.KindCatalog

func (*GatewayClient) GetOpenApi added in v0.3.0

func (client *GatewayClient) GetOpenApi() ([]byte, error)

type LoginResult added in v0.2.7

type LoginResult struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
}

type SqlResult added in v0.3.1

type SqlResult struct {
	Header []string        `json:"header"`
	Row    [][]interface{} `json:"row"`
}

type Token added in v0.2.7

type Token struct {
	Id           string `json:"id"`
	Name         string `json:"name"`
	CreatedAt    string `json:"createdAt"`
	LastTimeUsed string `json:"lastTimeUsed"`
}

type UpsertResponse

type UpsertResponse struct {
	UpsertResult string
}

Jump to

Keyboard shortcuts

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