Documentation ¶
Index ¶
- Constants
- func IsXML(content string) bool
- type API
- type Api
- type BasicAuth
- type BasicAuthWithCSRF
- type CSRFInfo
- type CSRInfoResponse
- type CertInfo
- type CertRequest
- type CertResponse
- type CertificateGen
- type CertificateGenWithCSRF
- type ClientIdentity
- type CreateServiceResponse
- type Credentials
- type CredentialsWithCSRF
- type DocsObject
- type Documentation
- type Events
- type InfoProviderFunc
- type MgmtInfoReponse
- type MgmtURLs
- type Oauth
- type OauthWithCSRF
- type RequestParameters
- type RuntimeURLs
- type Service
- type ServiceDetails
- type SpecResponse
- type TokenResponse
Constants ¶
View Source
const ( TokenFormat = "?token=%s" CertsEndpoint = "/v1/applications/certificates" ManagementInfoEndpoint = "/v1/applications/management/info" ApplicationRegistryEndpointFormat = "/%s/v1/metadata/services" EventsInfoEndpoint = "/subscribed" RenewCertURLFormat = "%s/v1/applications/certificates/renewals" RevocationCertURLFormat = "%s/v1/applications/certificates/revocations" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct { TargetUrl string `json:"targetUrl" valid:"url,required~targetUrl field cannot be empty."` Credentials *CredentialsWithCSRF `json:"credentials,omitempty"` Spec *SpecResponse `json:"spec,omitempty"` SpecificationUrl string `json:"specificationUrl,omitempty"` ApiType string `json:"apiType,omitempty"` RequestParameters *RequestParameters `json:"requestParameters,omitempty"` SpecificationCredentials *Credentials `json:"specificationCredentials,omitempty"` SpecificationRequestParameters *RequestParameters `json:"specificationRequestParameters,omitempty"` Headers *map[string][]string `json:"headers,omitempty"` QueryParameters *map[string][]string `json:"queryParameters,omitempty"` }
type Api ¶
type Api struct { *RuntimeURLs InfoURL string `json:"infoUrl"` CertificatesURL string `json:"certificatesUrl"` }
type BasicAuthWithCSRF ¶
type CSRFInfo ¶
type CSRFInfo struct {
TokenEndpointURL string `json:"tokenEndpointURL" valid:"url,required~tokenEndpointURL field cannot be empty"`
}
type CSRInfoResponse ¶
type CertInfo ¶
type CertInfo struct { Subject string `json:"subject"` Extensions string `json:"extensions"` KeyAlgorithm string `json:"key-algorithm"` }
func ToCertInfo ¶
func ToCertInfo(signingRequestInfo *schema.CertificateSigningRequestInfo) CertInfo
type CertRequest ¶
type CertRequest struct {
CSR string `json:"csr"`
}
type CertResponse ¶
type CertResponse struct { CRTChain string `json:"crt"` ClientCRT string `json:"clientCrt"` CaCRT string `json:"caCrt"` }
func ToCertResponse ¶
func ToCertResponse(certificationResult schema.CertificationResult) CertResponse
type CertificateGen ¶
type CertificateGenWithCSRF ¶
type CertificateGenWithCSRF struct { CertificateGen CSRFInfo *CSRFInfo `json:"csrfInfo,omitempty"` }
type ClientIdentity ¶
type CreateServiceResponse ¶
type CreateServiceResponse struct {
ID string `json:"id"`
}
type Credentials ¶
type CredentialsWithCSRF ¶
type CredentialsWithCSRF struct { OauthWithCSRF *OauthWithCSRF `json:"oauth,omitempty"` BasicWithCSRF *BasicAuthWithCSRF `json:"basic,omitempty"` CertificateGenWithCSRF *CertificateGenWithCSRF `json:"certificateGen,omitempty"` }
type DocsObject ¶
type Documentation ¶
type Documentation struct { DisplayName string `json:"displayName" valid:"required~displayName field cannot be empty in documentation"` Description string `json:"description" valid:"required~description field cannot be empty in documentation"` Type string `json:"type" valid:"required~type field cannot be empty in documentation"` Tags []string `json:"tags,omitempty"` Docs []DocsObject `json:"docs,omitempty"` }
type Events ¶
type Events struct {
Spec *SpecResponse `json:"spec" valid:"required~spec cannot be empty"`
}
type InfoProviderFunc ¶
type InfoProviderFunc func(applicationName string, eventServiceBaseURL, tenant string, configuration schema.Configuration) (interface{}, error)
func NewCSRInfoResponseProvider ¶
func NewCSRInfoResponseProvider(connectivityAdapterBaseURL, connectivityAdapterMTLSBaseURL string) InfoProviderFunc
func NewManagementInfoResponseProvider ¶
func NewManagementInfoResponseProvider(connectivityAdapterMTLSBaseURL string) InfoProviderFunc
type MgmtInfoReponse ¶
type MgmtInfoReponse struct { ClientIdentity ClientIdentity `json:"clientIdentity"` URLs MgmtURLs `json:"urls"` CertificateInfo CertInfo `json:"certificate"` }
type MgmtURLs ¶
type MgmtURLs struct { *RuntimeURLs RenewCertURL string `json:"renewCertUrl"` RevokeCertURL string `json:"revokeCertUrl"` }
type Oauth ¶
type Oauth struct { URL string `json:"url" valid:"url,required~oauth url field cannot be empty"` ClientID string `json:"clientId" valid:"required~oauth clientId field cannot be empty"` ClientSecret string `json:"clientSecret" valid:"required~oauth clientSecret cannot be empty"` RequestParameters *RequestParameters `json:"requestParameters,omitempty"` }
type OauthWithCSRF ¶
type RequestParameters ¶
type RuntimeURLs ¶
type ServiceDetails ¶
type ServiceDetails struct { Provider string `json:"provider" valid:"required~Provider field cannot be empty."` Name string `json:"name" valid:"required~Name field cannot be empty."` Description string `json:"description" valid:"required~Description field cannot be empty."` ShortDescription string `json:"shortDescription,omitempty"` Identifier string `json:"identifier,omitempty"` Labels *map[string]string `json:"labels,omitempty"` Api *API `json:"api,omitempty"` Events *Events `json:"events,omitempty"` Documentation *Documentation `json:"documentation,omitempty"` }
type SpecResponse ¶
type SpecResponse string
func (*SpecResponse) MarshalJSON ¶
func (sp *SpecResponse) MarshalJSON() ([]byte, error)
func (*SpecResponse) UnmarshalJSON ¶
func (sp *SpecResponse) UnmarshalJSON(bytes []byte) error
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.