model

package
v0.0.0-...-ecc6c17 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIDefinition

type APIDefinition struct {
	ID            string
	ApplicationID string
	Name          string
	Description   *string
	Spec          *APISpec
	TargetURL     string
	//  group allows you to find the same API but in different version
	Group *string
	// Returns authentication details for all runtimes, even for a runtime, where Auth is not yet specified.
	Auths []*RuntimeAuth
	// If defaultAuth is specified, it will be used for all Runtimes that does not specify Auth explicitly.
	DefaultAuth *Auth
	Version     *Version
}

type APIDefinitionInput

type APIDefinitionInput struct {
	Name        string
	Description *string
	TargetURL   string
	Group       *string
	Spec        *APISpecInput
	Version     *VersionInput
	DefaultAuth *AuthInput
}

func (*APIDefinitionInput) ToAPIDefinition

func (a *APIDefinitionInput) ToAPIDefinition(id string, appID string) *APIDefinition

type APIDefinitionPage

type APIDefinitionPage struct {
	Data       []*APIDefinition
	PageInfo   *pagination.Page
	TotalCount int
}

func (APIDefinitionPage) IsPageable

func (APIDefinitionPage) IsPageable()

type APISpec

type APISpec struct {
	// when fetch request specified, data will be automatically populated
	Data         *string
	Format       SpecFormat
	Type         APISpecType
	FetchRequest *FetchRequest
}

type APISpecInput

type APISpecInput struct {
	Data         *string
	Type         APISpecType
	Format       SpecFormat
	FetchRequest *FetchRequestInput
}

func (*APISpecInput) ToAPISpec

func (a *APISpecInput) ToAPISpec() *APISpec

type APISpecType

type APISpecType string
const (
	APISpecTypeOdata   APISpecType = "ODATA"
	APISpecTypeOpenAPI APISpecType = "OPEN_API"
)

type Application

type Application struct {
	ID             string
	Tenant         string
	Name           string
	Description    *string
	Labels         map[string][]string
	Annotations    map[string]interface{}
	Status         *ApplicationStatus
	HealthCheckURL *string
}

func (*Application) AddAnnotation

func (a *Application) AddAnnotation(key string, value interface{}) error

func (*Application) AddLabel

func (a *Application) AddLabel(key string, values []string)

func (*Application) DeleteAnnotation

func (a *Application) DeleteAnnotation(key string) error

func (*Application) DeleteLabel

func (a *Application) DeleteLabel(key string, valuesToDelete []string) error

type ApplicationInput

type ApplicationInput struct {
	Name           string
	Description    *string
	Labels         map[string][]string
	Annotations    map[string]interface{}
	HealthCheckURL *string
	Webhooks       []*ApplicationWebhookInput
	Apis           []*APIDefinitionInput
	EventAPIs      []*EventAPIDefinitionInput
	Documents      []*DocumentInput
}

func (*ApplicationInput) ToApplication

func (i *ApplicationInput) ToApplication(id, tenant string) *Application

type ApplicationPage

type ApplicationPage struct {
	Data       []*Application
	PageInfo   *pagination.Page
	TotalCount int
}

type ApplicationStatus

type ApplicationStatus struct {
	Condition ApplicationStatusCondition
	Timestamp time.Time
}

type ApplicationStatusCondition

type ApplicationStatusCondition string
const (
	ApplicationStatusConditionInitial ApplicationStatusCondition = "INITIAL"
	ApplicationStatusConditionUnknown ApplicationStatusCondition = "UNKNOWN"
	ApplicationStatusConditionReady   ApplicationStatusCondition = "READY"
	ApplicationStatusConditionFailed  ApplicationStatusCondition = "FAILED"
)

type ApplicationWebhook

type ApplicationWebhook struct {
	ApplicationID string
	ID            string
	Type          ApplicationWebhookType
	URL           string
	Auth          *Auth
}

type ApplicationWebhookInput

type ApplicationWebhookInput struct {
	Type ApplicationWebhookType
	URL  string
	Auth *AuthInput
}

func (*ApplicationWebhookInput) ToWebhook

func (i *ApplicationWebhookInput) ToWebhook(id, applicationID string) *ApplicationWebhook

type ApplicationWebhookType

type ApplicationWebhookType string
const (
	ApplicationWebhookTypeConfigurationChanged ApplicationWebhookType = "CONFIGURATION_CHANGED"
)

type Auth

type Auth struct {
	Credential            CredentialData
	AdditionalHeaders     map[string][]string
	AdditionalQueryParams map[string][]string
	RequestAuth           *CredentialRequestAuth
}

type AuthInput

type AuthInput struct {
	Credential            *CredentialDataInput
	AdditionalHeaders     map[string][]string
	AdditionalQueryParams map[string][]string
	RequestAuth           *CredentialRequestAuthInput
}

func (*AuthInput) ToAuth

func (i *AuthInput) ToAuth() *Auth

type BasicCredentialData

type BasicCredentialData struct {
	Username string
	Password string
}

type BasicCredentialDataInput

type BasicCredentialDataInput struct {
	Username string
	Password string
}

func (*BasicCredentialDataInput) ToBasicCredentialData

func (i *BasicCredentialDataInput) ToBasicCredentialData() *BasicCredentialData

type CSRFTokenCredentialRequestAuth

type CSRFTokenCredentialRequestAuth struct {
	TokenEndpointURL      string
	Credential            CredentialData
	AdditionalHeaders     map[string][]string
	AdditionalQueryParams map[string][]string
}

type CSRFTokenCredentialRequestAuthInput

type CSRFTokenCredentialRequestAuthInput struct {
	TokenEndpointURL      string
	Credential            *CredentialDataInput
	AdditionalHeaders     map[string][]string
	AdditionalQueryParams map[string][]string
}

func (*CSRFTokenCredentialRequestAuthInput) ToCSRFTokenCredentialRequestAuth

func (i *CSRFTokenCredentialRequestAuthInput) ToCSRFTokenCredentialRequestAuth() *CSRFTokenCredentialRequestAuth

type CredentialData

type CredentialData struct {
	Basic *BasicCredentialData
	Oauth *OAuthCredentialData
}

type CredentialDataInput

type CredentialDataInput struct {
	Basic *BasicCredentialDataInput
	Oauth *OAuthCredentialDataInput
}

func (*CredentialDataInput) ToCredentialData

func (i *CredentialDataInput) ToCredentialData() *CredentialData

type CredentialRequestAuth

type CredentialRequestAuth struct {
	Csrf *CSRFTokenCredentialRequestAuth
}

type CredentialRequestAuthInput

type CredentialRequestAuthInput struct {
	Csrf *CSRFTokenCredentialRequestAuthInput
}

func (*CredentialRequestAuthInput) ToCredentialRequestAuth

func (i *CredentialRequestAuthInput) ToCredentialRequestAuth() *CredentialRequestAuth

type Document

type Document struct {
	ApplicationID string
	ID            string
	Title         string
	DisplayName   string
	Description   string
	Format        DocumentFormat
	// for example Service Class, API etc
	Kind         *string
	Data         *string
	FetchRequest *FetchRequest
}

type DocumentFormat

type DocumentFormat string
const (
	DocumentFormatMarkdown DocumentFormat = "MARKDOWN"
)

type DocumentInput

type DocumentInput struct {
	Title        string
	DisplayName  string
	Description  string
	Format       DocumentFormat
	Kind         *string
	Data         *string
	FetchRequest *FetchRequestInput
}

func (*DocumentInput) ToDocument

func (d *DocumentInput) ToDocument(id, applicationID string) *Document

type DocumentPage

type DocumentPage struct {
	Data       []*Document
	PageInfo   *pagination.Page
	TotalCount int
}

type EventAPIDefinition

type EventAPIDefinition struct {
	ID            string
	ApplicationID string
	Name          string
	Description   *string
	Group         *string
	Spec          *EventAPISpec
	Version       *Version
}

type EventAPIDefinitionInput

type EventAPIDefinitionInput struct {
	Name        string
	Description *string
	Spec        *EventAPISpecInput
	Group       *string
	Version     *VersionInput
}

func (*EventAPIDefinitionInput) ToEventAPIDefinition

func (e *EventAPIDefinitionInput) ToEventAPIDefinition(id, applicationID string) *EventAPIDefinition

type EventAPIDefinitionPage

type EventAPIDefinitionPage struct {
	Data       []*EventAPIDefinition
	PageInfo   *pagination.Page
	TotalCount int
}

func (EventAPIDefinitionPage) IsPageable

func (EventAPIDefinitionPage) IsPageable()

type EventAPISpec

type EventAPISpec struct {
	Data         *string
	Type         EventAPISpecType
	Format       SpecFormat
	FetchRequest *FetchRequest
}

type EventAPISpecInput

type EventAPISpecInput struct {
	Data          *string
	EventSpecType EventAPISpecType
	Format        SpecFormat
	FetchRequest  *FetchRequestInput
}

func (*EventAPISpecInput) ToEventAPISpec

func (e *EventAPISpecInput) ToEventAPISpec() *EventAPISpec

type EventAPISpecType

type EventAPISpecType string
const (
	EventAPISpecTypeAsyncAPI EventAPISpecType = "ASYNC_API"
)

type FetchMode

type FetchMode string
const (
	FetchModeSingle  FetchMode = "SINGLE"
	FetchModePackage FetchMode = "PACKAGE"
	FetchModeIndex   FetchMode = "INDEX"
)

type FetchRequest

type FetchRequest struct {
	URL    string
	Auth   *Auth
	Mode   FetchMode
	Filter *string
	Status *FetchRequestStatus
}

Compass performs fetch to validate if request is correct and stores a copy

type FetchRequestInput

type FetchRequestInput struct {
	URL    string
	Auth   *AuthInput
	Mode   *FetchMode
	Filter *string
}

func (*FetchRequestInput) ToFetchRequest

func (f *FetchRequestInput) ToFetchRequest(timestamp time.Time) *FetchRequest

type FetchRequestStatus

type FetchRequestStatus struct {
	Condition FetchRequestStatusCondition
	Timestamp time.Time
}

type FetchRequestStatusCondition

type FetchRequestStatusCondition string
const (
	FetchRequestStatusConditionInitial   FetchRequestStatusCondition = "INITIAL"
	FetchRequestStatusConditionSucceeded FetchRequestStatusCondition = "SUCCEEDED"
	FetchRequestStatusConditionFailed    FetchRequestStatusCondition = "FAILED"
)

type OAuthCredentialData

type OAuthCredentialData struct {
	ClientID     string
	ClientSecret string
	URL          string
}

type OAuthCredentialDataInput

type OAuthCredentialDataInput struct {
	ClientID     string
	ClientSecret string
	URL          string
}

func (*OAuthCredentialDataInput) ToOAuthCredentialData

func (i *OAuthCredentialDataInput) ToOAuthCredentialData() *OAuthCredentialData

type Runtime

type Runtime struct {
	ID          string
	Name        string
	Description *string
	Tenant      string
	Labels      map[string][]string
	Annotations map[string]interface{}
	Status      *RuntimeStatus
	AgentAuth   *Auth
}

func (*Runtime) AddAnnotation

func (r *Runtime) AddAnnotation(key string, value interface{}) error

func (*Runtime) AddLabel

func (r *Runtime) AddLabel(key string, values []string)

func (*Runtime) DeleteAnnotation

func (r *Runtime) DeleteAnnotation(key string) error

func (*Runtime) DeleteLabel

func (r *Runtime) DeleteLabel(key string, valuesToDelete []string) error

type RuntimeAuth

type RuntimeAuth struct {
	RuntimeID string
	Auth      *Auth
}

type RuntimeInput

type RuntimeInput struct {
	Name        string
	Description *string
	Labels      map[string][]string
	Annotations map[string]interface{}
}

func (*RuntimeInput) ToRuntime

func (i *RuntimeInput) ToRuntime(id string, tenant string) *Runtime

type RuntimePage

type RuntimePage struct {
	Data       []*Runtime
	PageInfo   *pagination.Page
	TotalCount int
}

type RuntimeStatus

type RuntimeStatus struct {
	Condition RuntimeStatusCondition
	Timestamp time.Time
}

type RuntimeStatusCondition

type RuntimeStatusCondition string
const (
	RuntimeStatusConditionInitial RuntimeStatusCondition = "INITIAL"
	RuntimeStatusConditionReady   RuntimeStatusCondition = "READY"
	RuntimeStatusConditionFailed  RuntimeStatusCondition = "FAILED"
)

type SpecFormat

type SpecFormat string
const (
	SpecFormatYaml SpecFormat = "YAML"
	SpecFormatJSON SpecFormat = "JSON"
)

type Timestamp

type Timestamp time.Time

type Version

type Version struct {
	// for example 4.6
	Value      string
	Deprecated *bool
	// for example 4.5
	DeprecatedSince *string
	// if true, will be removed in the next version
	ForRemoval *bool
}

type VersionInput

type VersionInput struct {
	Value           string
	Deprecated      *bool
	DeprecatedSince *string
	ForRemoval      *bool
}

func (*VersionInput) ToVersion

func (v *VersionInput) ToVersion() *Version

Jump to

Keyboard shortcuts

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