gravitee

package
v0.0.0-...-db9fdaa Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ClonedProdAttribute = "ClonedProduct"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllApis

type AllApis struct {
	Apis       []models.Api      `json:"data"`
	Pagination models.Pagination `json:"pagination"`
}

type AllPlans

type AllPlans struct {
	Plans []models.Plan `json:"data"`
}

type AllSpecs

type AllSpecs struct {
	Specs      []models.Spec     `json:"pages"`
	Pagination models.Pagination `json:"pagination"`
}

type AllSubs

type AllSubs struct {
	Subs []models.Subscriptions `json:"data"`
}

type GraviteeClient

type GraviteeClient struct {
	EnvId string
	OrgId string
	// contains filtered or unexported fields
}

GraviteeClient - Represents the Gateway client

func NewClient

func NewClient(graviteeCfg *config.GraviteeConfig) (*GraviteeClient, error)

NewClient - Creates a new Gateway Client

func (*GraviteeClient) CreateApp

func (a *GraviteeClient) CreateApp(appli *models.App) (*models.App, error)

CreateAppCredentials - Request to create an application

func (*GraviteeClient) CreatePlan

func (a *GraviteeClient) CreatePlan(apiId string, plan *models.Plan) (*models.Plan, error)

func (*GraviteeClient) DeployApi

func (a *GraviteeClient) DeployApi(apiID string) error

func (*GraviteeClient) GetAPIKey

func (a *GraviteeClient) GetAPIKey(subsId, appId string) ([]models.AppCredentials, error)

GetAPIKey - Request to get the api key assigned to your subscription

func (*GraviteeClient) GetApi

func (a *GraviteeClient) GetApi(apiID string) (api *models.Api, error error)

GetApi - get details of the api

func (*GraviteeClient) GetApis

func (a *GraviteeClient) GetApis() ([]models.Api, error)

GetListAPIs - get the list of APIs

func (*GraviteeClient) GetApp

func (a *GraviteeClient) GetApp(id string) (app *models.App, err error)

GetApp - Get an Application by id

func (*GraviteeClient) GetApps

func (a *GraviteeClient) GetApps() ([]models.App, error)

GetApps - Get all Applications

func (*GraviteeClient) GetConfig

func (a *GraviteeClient) GetConfig() *config.GraviteeConfig

GetConfig - return the gravitee client config

func (*GraviteeClient) GetEnvId

func (a *GraviteeClient) GetEnvId() string

GetEnvId - get the developer id to be used when creating apps

func (*GraviteeClient) GetOrgId

func (a *GraviteeClient) GetOrgId() string

func (*GraviteeClient) GetSpecificSubscription

func (a *GraviteeClient) GetSpecificSubscription(subsId, appId string) (*models.Subscriptions, error)

GetSpecificSubscription - Request to get the API's subscription by its identifier

func (*GraviteeClient) GetSpecs

func (a *GraviteeClient) GetSpecs(apiID string) (specs []models.Spec, error error)

func (*GraviteeClient) GetSubscriptions

func (a *GraviteeClient) GetSubscriptions(appid string) ([]models.Subscriptions, error)

GetSubscriptions - Request to list subscriptions for a given API

func (*GraviteeClient) IsReady

func (a *GraviteeClient) IsReady() bool

IsReady - returns true when the gravitee client authenticates

func (*GraviteeClient) ListAPIsPlans

func (a *GraviteeClient) ListAPIsPlans(apiId string) ([]models.Plan, error)

func (*GraviteeClient) PublishaPlan

func (a *GraviteeClient) PublishaPlan(apiId, planId string) error

func (*GraviteeClient) RemoveAPIKey

func (a *GraviteeClient) RemoveAPIKey(appId, subsId, apikeyId string) error

GetAPIKey - Request to get the api key assigned to your subscription

func (*GraviteeClient) RemoveApp

func (a *GraviteeClient) RemoveApp(appId string) error

func (*GraviteeClient) SubscribetoAnAPI

func (a *GraviteeClient) SubscribetoAnAPI(appId, planId string) (*models.Subscriptions, error)

SubscribetoAnAPI - Request for your application to subscribe to an api

func (*GraviteeClient) TransferSubs

func (a *GraviteeClient) TransferSubs(apiId, subId, newPlanId string) (*models.Subscriptions, error)

func (*GraviteeClient) UpdateCredential

func (a *GraviteeClient) UpdateCredential(appId, subId string) error

type PolicyDetail

type PolicyDetail struct {
	PolicyType string `json:"policyType"`
}

type PortalData

type PortalData struct {
	ID                   string `json:"id"`
	Name                 string `json:"name"`
	Description          string `json:"description"`
	CustomDomain         string `json:"customDomain"`
	OrgName              string `json:"orgName"`
	Status               string `json:"status"`
	VisibleToCustomers   bool   `json:"visibleToCustomers"`
	HTTPS                bool   `json:"https"`
	DefaultDomain        string `json:"defaultDomain"`
	CustomeDomainEnabled bool   `json:"customDomainEnabled"`
	DefaultURL           string `json:"defaultURL"`
	CurrentURL           string `json:"currentURL"`
	CurrentDomain        string `json:"currentDomain"`
}

type PortalResponse

type PortalResponse struct {
	Status    string     `json:"status"`
	Message   string     `json:"message"`
	Code      string     `json:"code"`
	ErrorCode string     `json:"error_code"`
	RequestID string     `json:"request_id"`
	Data      PortalData `json:"data"`
}

PortalResponse

type PortalsResponse

type PortalsResponse struct {
	Status    string       `json:"status"`
	Message   string       `json:"message"`
	Code      string       `json:"code"`
	ErrorCode string       `json:"error_code"`
	RequestID string       `json:"request_id"`
	Data      []PortalData `json:"data"`
}

PortalsResponse

type RequestOption

type RequestOption func(*graviteeRequest)

func WithBody

func WithBody(body []byte) RequestOption

WithBody - add a JSON body to the request

func WithDefaultHeaders

func WithDefaultHeaders() RequestOption

WithDefaultHeaders - add the default headers needed for gravitee

func WithHeader

func WithHeader(name, value string) RequestOption

WithHeader - add an additional header to the request

func WithHeaders

func WithHeaders(headers map[string]string) RequestOption

WithHeaders - add additional headers to the request

func WithQueryParam

func WithQueryParam(name, value string) RequestOption

WithQueryParam - add a query parameter to the request

func WithQueryParams

func WithQueryParams(queryParams map[string]string) RequestOption

WithQueryParams - add query parameters to the request

func WithStringBody

func WithStringBody(body string) RequestOption

WithStringBody - add a JSON body, from a string, to the request

func WithToken

func WithToken(token string) RequestOption

type VirtualHosts

type VirtualHosts []string

VirtualHosts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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