apim

package
v0.0.0-...-036f9fd Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderAuthorization           = "Authorization"
	HeaderAccept                  = "Accept"
	HeaderContentType             = "Content-Type"
	HeaderConnection              = "Connection"
	HeaderValueApplicationJSON    = "application/json"
	HeaderValueAuthBasicPrefix    = "Basic"
	HeaderValueAuthBearerPrefix   = "Bearer"
	HeaderValueKeepAlive          = "keep-alive"
	HeaderValueXWWWFormUrlEncoded = "application/x-www-form-urlencoded"
	DefaultHttpRequestTimeout     = 10000
	Deployment                    = "Deployment"
	Certificates                  = "certificates"
)

Variables

This section is empty.

Functions

func DeleteImportedAPI

func DeleteImportedAPI(client *client.Client, instance *wso2v1alpha2.API) error

func GetAPIDefinition

func GetAPIDefinition(filePath string) (*v2.APIDefinitionFile, error)

GetAPIDefinition scans filePath and returns v2.APIDefinitionFile or an error

func GetAdditionalProperties

func GetAdditionalProperties(swaggerData string) (string, string, string, error)

getAdditionalProperties returns additional data required by REST API when adding an API using swagger definition

func GetTempPathOfExtractedArchive

func GetTempPathOfExtractedArchive(data []byte) (string, error)

func ImportAPI

func ImportAPI(client *client.Client, api *wso2v1alpha2.API) error

ImportAPI imports an API to APIM using either project zip or swagger

func YamlToJson

func YamlToJson(yamlData []byte) ([]byte, error)

YamlToJson converts a yaml string to json

Types

type API

type API struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Context         string `json:"context"`
	Version         string `json:"version"`
	Provider        string `json:"provider"`
	LifeCycleStatus string `json:"lifeCycleStatus"`
}

type APIListResponse

type APIListResponse struct {
	Count int32 `json:"count"`
	List  []API `json:"list"`
}

type ClientRegistrationResponse

type ClientRegistrationResponse struct {
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
	ClientName   string `json:"clientName"`
	CallBackURL  string `json:"callBackURL"`
	JsonString   string `json:"jsonString"`
}

type RESTConfig

type RESTConfig struct {
	KeyManagerEndpoint    string
	PublisherEndpoint     string
	TokenEndpoint         string
	CredentialsSecretName string
	SkipVerification      bool
}

type TokenResponse

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

Jump to

Keyboard shortcuts

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