graphql

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllDocumentFormat = []DocumentFormat{
	DocumentFormatMarkdown,
}
View Source
var AllEventAPISpecType = []EventAPISpecType{
	EventAPISpecTypeAsyncAPI,
}

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type APIDefinition

type APIDefinition struct {
	ID            string   `json:"id"`
	ApplicationID string   `json:"applicationID"`
	Name          string   `json:"name"`
	Description   *string  `json:"description"`
	Spec          *APISpec `json:"spec"`
	TargetURL     string   `json:"targetURL"`
	//  group allows you to find the same API but in different version
	Group *string `json:"group"`
	// "If runtime does not exist, an error is returned. If runtime exists but Auth for it is not set, defaultAuth is returned if specified.
	Auth *RuntimeAuth `json:"auth"`
	// Returns authentication details for all runtimes, even for a runtime, where Auth is not yet specified.
	Auths []*RuntimeAuth `json:"auths"`
	// If defaultAuth is specified, it will be used for all Runtimes that does not specify Auth explicitly.
	DefaultAuth *Auth    `json:"defaultAuth"`
	Version     *Version `json:"version"`
}

type APIDefinitionInput

type APIDefinitionInput struct {
	Name        string        `json:"name"`
	Description *string       `json:"description"`
	TargetURL   string        `json:"targetURL"`
	Group       *string       `json:"group"`
	Spec        *APISpecInput `json:"spec"`
	Version     *VersionInput `json:"version"`
	DefaultAuth *AuthInput    `json:"defaultAuth"`
}

type APIDefinitionPage

type APIDefinitionPage struct {
	Data       []*APIDefinition `json:"data"`
	PageInfo   *PageInfo        `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

func (APIDefinitionPage) IsPageable

func (APIDefinitionPage) IsPageable()

type APISpec

type APISpec struct {
	// when fetch request specified, data will be automatically populated
	Data         *CLOB         `json:"data"`
	Format       SpecFormat    `json:"format"`
	Type         APISpecType   `json:"type"`
	FetchRequest *FetchRequest `json:"fetchRequest"`
}

type APISpecInput

type APISpecInput struct {
	Data         *CLOB              `json:"data"`
	Type         APISpecType        `json:"type"`
	Format       SpecFormat         `json:"format"`
	FetchRequest *FetchRequestInput `json:"fetchRequest"`
}

type APISpecType

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

func (APISpecType) IsValid

func (e APISpecType) IsValid() bool

func (APISpecType) MarshalGQL

func (e APISpecType) MarshalGQL(w io.Writer)

func (APISpecType) String

func (e APISpecType) String() string

func (*APISpecType) UnmarshalGQL

func (e *APISpecType) UnmarshalGQL(v interface{}) error

type Annotation

type Annotation struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

type Annotations

type Annotations map[string]interface{}

func (Annotations) MarshalGQL

func (y Annotations) MarshalGQL(w io.Writer)

func (*Annotations) UnmarshalGQL

func (y *Annotations) UnmarshalGQL(v interface{}) error

type Application

type Application struct {
	ID             string             `json:"id"`
	Name           string             `json:"name"`
	Description    *string            `json:"description"`
	Labels         Labels             `json:"labels"`
	Annotations    Annotations        `json:"annotations"`
	Status         *ApplicationStatus `json:"status"`
	HealthCheckURL *string            `json:"healthCheckURL"`
}

type ApplicationInput

type ApplicationInput struct {
	Name           string                     `json:"name"`
	Description    *string                    `json:"description"`
	Labels         *Labels                    `json:"labels"`
	Annotations    *Annotations               `json:"annotations"`
	Webhooks       []*ApplicationWebhookInput `json:"webhooks"`
	HealthCheckURL *string                    `json:"healthCheckURL"`
	Apis           []*APIDefinitionInput      `json:"apis"`
	EventAPIs      []*EventAPIDefinitionInput `json:"eventAPIs"`
	Documents      []*DocumentInput           `json:"documents"`
}

type ApplicationPage

type ApplicationPage struct {
	Data       []*Application `json:"data"`
	PageInfo   *PageInfo      `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

func (ApplicationPage) IsPageable

func (ApplicationPage) IsPageable()

type ApplicationResolver

type ApplicationResolver interface {
	Webhooks(ctx context.Context, obj *Application) ([]*ApplicationWebhook, error)

	Apis(ctx context.Context, obj *Application, group *string, first *int, after *PageCursor) (*APIDefinitionPage, error)
	EventAPIs(ctx context.Context, obj *Application, group *string, first *int, after *PageCursor) (*EventAPIDefinitionPage, error)
	Documents(ctx context.Context, obj *Application, first *int, after *PageCursor) (*DocumentPage, error)
}

type ApplicationStatus

type ApplicationStatus struct {
	Condition ApplicationStatusCondition `json:"condition"`
	Timestamp Timestamp                  `json:"timestamp"`
}

type ApplicationStatusCondition

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

func (ApplicationStatusCondition) IsValid

func (e ApplicationStatusCondition) IsValid() bool

func (ApplicationStatusCondition) MarshalGQL

func (e ApplicationStatusCondition) MarshalGQL(w io.Writer)

func (ApplicationStatusCondition) String

func (*ApplicationStatusCondition) UnmarshalGQL

func (e *ApplicationStatusCondition) UnmarshalGQL(v interface{}) error

type ApplicationWebhook

type ApplicationWebhook struct {
	ID            string                 `json:"id"`
	ApplicationID string                 `json:"applicationID"`
	Type          ApplicationWebhookType `json:"type"`
	URL           string                 `json:"url"`
	Auth          *Auth                  `json:"auth"`
}

type ApplicationWebhookInput

type ApplicationWebhookInput struct {
	Type ApplicationWebhookType `json:"type"`
	URL  string                 `json:"url"`
	Auth *AuthInput             `json:"auth"`
}

type ApplicationWebhookType

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

func (ApplicationWebhookType) IsValid

func (e ApplicationWebhookType) IsValid() bool

func (ApplicationWebhookType) MarshalGQL

func (e ApplicationWebhookType) MarshalGQL(w io.Writer)

func (ApplicationWebhookType) String

func (e ApplicationWebhookType) String() string

func (*ApplicationWebhookType) UnmarshalGQL

func (e *ApplicationWebhookType) UnmarshalGQL(v interface{}) error

type Auth

type Auth struct {
	Credential            CredentialData         `json:"credential"`
	AdditionalHeaders     *HttpHeaders           `json:"additionalHeaders"`
	AdditionalQueryParams *QueryParams           `json:"additionalQueryParams"`
	RequestAuth           *CredentialRequestAuth `json:"requestAuth"`
}

func (*Auth) UnmarshalJSON

func (a *Auth) UnmarshalJSON(data []byte) error

UnmarshalJSON is used only by integration tests, we have to help graphql client to deal with Credential field

type AuthInput

type AuthInput struct {
	Credential            *CredentialDataInput        `json:"credential"`
	AdditionalHeaders     *HttpHeaders                `json:"additionalHeaders"`
	AdditionalQueryParams *QueryParams                `json:"additionalQueryParams"`
	RequestAuth           *CredentialRequestAuthInput `json:"requestAuth"`
}

type BasicCredentialData

type BasicCredentialData struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

func (BasicCredentialData) IsCredentialData

func (BasicCredentialData) IsCredentialData()

type BasicCredentialDataInput

type BasicCredentialDataInput struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type CLOB

type CLOB string

func (CLOB) MarshalGQL

func (y CLOB) MarshalGQL(w io.Writer)

func (*CLOB) UnmarshalGQL

func (y *CLOB) UnmarshalGQL(v interface{}) error

type CSRFTokenCredentialRequestAuth

type CSRFTokenCredentialRequestAuth struct {
	TokenEndpointURL      string         `json:"tokenEndpointURL"`
	Credential            CredentialData `json:"credential"`
	AdditionalHeaders     *HttpHeaders   `json:"additionalHeaders"`
	AdditionalQueryParams *QueryParams   `json:"additionalQueryParams"`
}

type CSRFTokenCredentialRequestAuthInput

type CSRFTokenCredentialRequestAuthInput struct {
	TokenEndpointURL      string               `json:"tokenEndpointURL"`
	Credential            *CredentialDataInput `json:"credential"`
	AdditionalHeaders     *HttpHeaders         `json:"additionalHeaders"`
	AdditionalQueryParams *QueryParams         `json:"additionalQueryParams"`
}

type ComplexityRoot

type ComplexityRoot struct {
	APIDefinition struct {
		ApplicationID func(childComplexity int) int
		Auth          func(childComplexity int, runtimeID string) int
		Auths         func(childComplexity int) int
		DefaultAuth   func(childComplexity int) int
		Description   func(childComplexity int) int
		Group         func(childComplexity int) int
		ID            func(childComplexity int) int
		Name          func(childComplexity int) int
		Spec          func(childComplexity int) int
		TargetURL     func(childComplexity int) int
		Version       func(childComplexity int) int
	}

	APIDefinitionPage struct {
		Data       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	APISpec struct {
		Data         func(childComplexity int) int
		FetchRequest func(childComplexity int) int
		Format       func(childComplexity int) int
		Type         func(childComplexity int) int
	}

	Annotation struct {
		Key   func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Application struct {
		Annotations    func(childComplexity int, key *string) int
		Apis           func(childComplexity int, group *string, first *int, after *PageCursor) int
		Description    func(childComplexity int) int
		Documents      func(childComplexity int, first *int, after *PageCursor) int
		EventAPIs      func(childComplexity int, group *string, first *int, after *PageCursor) int
		HealthCheckURL func(childComplexity int) int
		ID             func(childComplexity int) int
		Labels         func(childComplexity int, key *string) int
		Name           func(childComplexity int) int
		Status         func(childComplexity int) int
		Webhooks       func(childComplexity int) int
	}

	ApplicationPage struct {
		Data       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	ApplicationStatus struct {
		Condition func(childComplexity int) int
		Timestamp func(childComplexity int) int
	}

	ApplicationWebhook struct {
		ApplicationID func(childComplexity int) int
		Auth          func(childComplexity int) int
		ID            func(childComplexity int) int
		Type          func(childComplexity int) int
		URL           func(childComplexity int) int
	}

	Auth struct {
		AdditionalHeaders     func(childComplexity int) int
		AdditionalQueryParams func(childComplexity int) int
		Credential            func(childComplexity int) int
		RequestAuth           func(childComplexity int) int
	}

	BasicCredentialData struct {
		Password func(childComplexity int) int
		Username func(childComplexity int) int
	}

	CSRFTokenCredentialRequestAuth struct {
		AdditionalHeaders     func(childComplexity int) int
		AdditionalQueryParams func(childComplexity int) int
		Credential            func(childComplexity int) int
		TokenEndpointURL      func(childComplexity int) int
	}

	CredentialRequestAuth struct {
		Csrf func(childComplexity int) int
	}

	Document struct {
		ApplicationID func(childComplexity int) int
		Data          func(childComplexity int) int
		Description   func(childComplexity int) int
		DisplayName   func(childComplexity int) int
		FetchRequest  func(childComplexity int) int
		Format        func(childComplexity int) int
		ID            func(childComplexity int) int
		Kind          func(childComplexity int) int
		Title         func(childComplexity int) int
	}

	DocumentPage struct {
		Data       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	EventAPIDefinition struct {
		ApplicationID func(childComplexity int) int
		Description   func(childComplexity int) int
		Group         func(childComplexity int) int
		ID            func(childComplexity int) int
		Name          func(childComplexity int) int
		Spec          func(childComplexity int) int
		Version       func(childComplexity int) int
	}

	EventAPIDefinitionPage struct {
		Data       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	EventAPISpec struct {
		Data         func(childComplexity int) int
		FetchRequest func(childComplexity int) int
		Format       func(childComplexity int) int
		Type         func(childComplexity int) int
	}

	FetchRequest struct {
		Auth   func(childComplexity int) int
		Filter func(childComplexity int) int
		Mode   func(childComplexity int) int
		Status func(childComplexity int) int
		URL    func(childComplexity int) int
	}

	FetchRequestStatus struct {
		Condition func(childComplexity int) int
		Timestamp func(childComplexity int) int
	}

	HealthCheck struct {
		Condition func(childComplexity int) int
		Message   func(childComplexity int) int
		Origin    func(childComplexity int) int
		Timestamp func(childComplexity int) int
		Type      func(childComplexity int) int
	}

	HealthCheckPage struct {
		Data       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	Label struct {
		Key    func(childComplexity int) int
		Values func(childComplexity int) int
	}

	Mutation struct {
		AddAPI                      func(childComplexity int, applicationID string, in APIDefinitionInput) int
		AddApplicationAnnotation    func(childComplexity int, applicationID string, key string, value interface{}) int
		AddApplicationLabel         func(childComplexity int, applicationID string, key string, values []string) int
		AddApplicationWebhook       func(childComplexity int, applicationID string, in ApplicationWebhookInput) int
		AddDocument                 func(childComplexity int, applicationID string, in DocumentInput) int
		AddEventAPI                 func(childComplexity int, applicationID string, in EventAPIDefinitionInput) int
		AddRuntimeAnnotation        func(childComplexity int, runtimeID string, key string, value interface{}) int
		AddRuntimeLabel             func(childComplexity int, runtimeID string, key string, values []string) int
		CreateApplication           func(childComplexity int, in ApplicationInput) int
		CreateRuntime               func(childComplexity int, in RuntimeInput) int
		DeleteAPI                   func(childComplexity int, id string) int
		DeleteAPIAuth               func(childComplexity int, apiID string, runtimeID string) int
		DeleteApplication           func(childComplexity int, id string) int
		DeleteApplicationAnnotation func(childComplexity int, applicationID string, key string) int
		DeleteApplicationLabel      func(childComplexity int, applicationID string, key string, values []string) int
		DeleteApplicationWebhook    func(childComplexity int, webhookID string) int
		DeleteDocument              func(childComplexity int, id string) int
		DeleteEventAPI              func(childComplexity int, id string) int
		DeleteRuntime               func(childComplexity int, id string) int
		DeleteRuntimeAnnotation     func(childComplexity int, runtimeID string, key string) int
		DeleteRuntimeLabel          func(childComplexity int, runtimeID string, key string, values []string) int
		RefetchAPISpec              func(childComplexity int, apiID string) int
		RefetchEventAPISpec         func(childComplexity int, eventID string) int
		SetAPIAuth                  func(childComplexity int, apiID string, runtimeID string, in AuthInput) int
		UpdateAPI                   func(childComplexity int, id string, in APIDefinitionInput) int
		UpdateApplication           func(childComplexity int, id string, in ApplicationInput) int
		UpdateApplicationWebhook    func(childComplexity int, webhookID string, in ApplicationWebhookInput) int
		UpdateEventAPI              func(childComplexity int, id string, in EventAPIDefinitionInput) int
		UpdateRuntime               func(childComplexity int, id string, in RuntimeInput) int
	}

	OAuthCredentialData struct {
		ClientID     func(childComplexity int) int
		ClientSecret func(childComplexity int) int
		URL          func(childComplexity int) int
	}

	PageInfo struct {
		EndCursor   func(childComplexity int) int
		HasNextPage func(childComplexity int) int
		StartCursor func(childComplexity int) int
	}

	Query struct {
		Application  func(childComplexity int, id string) int
		Applications func(childComplexity int, filter []*LabelFilter, first *int, after *PageCursor) int
		HealthChecks func(childComplexity int, types []HealthCheckType, origin *string, first *int, after *PageCursor) int
		Runtime      func(childComplexity int, id string) int
		Runtimes     func(childComplexity int, filter []*LabelFilter, first *int, after *PageCursor) int
	}

	Runtime struct {
		AgentAuth   func(childComplexity int) int
		Annotations func(childComplexity int, key *string) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Labels      func(childComplexity int, key *string) int
		Name        func(childComplexity int) int
		Status      func(childComplexity int) int
	}

	RuntimeAuth struct {
		Auth      func(childComplexity int) int
		RuntimeID func(childComplexity int) int
	}

	RuntimePage struct {
		Data       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	RuntimeStatus struct {
		Condition func(childComplexity int) int
		Timestamp func(childComplexity int) int
	}

	Version struct {
		Deprecated      func(childComplexity int) int
		DeprecatedSince func(childComplexity int) int
		ForRemoval      func(childComplexity int) int
		Value           func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type CredentialData

type CredentialData interface {
	IsCredentialData()
}

type CredentialDataInput

type CredentialDataInput struct {
	Basic *BasicCredentialDataInput `json:"basic"`
	Oauth *OAuthCredentialDataInput `json:"oauth"`
}

type CredentialRequestAuth

type CredentialRequestAuth struct {
	Csrf *CSRFTokenCredentialRequestAuth `json:"csrf"`
}

type CredentialRequestAuthInput

type CredentialRequestAuthInput struct {
	Csrf *CSRFTokenCredentialRequestAuthInput `json:"csrf"`
}

type DirectiveRoot

type DirectiveRoot struct {
}

type Document

type Document struct {
	ID            string         `json:"id"`
	ApplicationID string         `json:"applicationID"`
	Title         string         `json:"title"`
	DisplayName   string         `json:"displayName"`
	Description   string         `json:"description"`
	Format        DocumentFormat `json:"format"`
	// for example Service Class, API etc
	Kind         *string       `json:"kind"`
	Data         *CLOB         `json:"data"`
	FetchRequest *FetchRequest `json:"fetchRequest"`
}

type DocumentFormat

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

func (DocumentFormat) IsValid

func (e DocumentFormat) IsValid() bool

func (DocumentFormat) MarshalGQL

func (e DocumentFormat) MarshalGQL(w io.Writer)

func (DocumentFormat) String

func (e DocumentFormat) String() string

func (*DocumentFormat) UnmarshalGQL

func (e *DocumentFormat) UnmarshalGQL(v interface{}) error

type DocumentInput

type DocumentInput struct {
	Title        string             `json:"title"`
	DisplayName  string             `json:"displayName"`
	Description  string             `json:"description"`
	Format       DocumentFormat     `json:"format"`
	Kind         *string            `json:"kind"`
	Data         *CLOB              `json:"data"`
	FetchRequest *FetchRequestInput `json:"fetchRequest"`
}

type DocumentPage

type DocumentPage struct {
	Data       []*Document `json:"data"`
	PageInfo   *PageInfo   `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

func (DocumentPage) IsPageable

func (DocumentPage) IsPageable()

type EventAPIDefinition

type EventAPIDefinition struct {
	ID            string  `json:"id"`
	ApplicationID string  `json:"applicationID"`
	Name          string  `json:"name"`
	Description   *string `json:"description"`
	// group allows you to find the same API but in different version
	Group   *string       `json:"group"`
	Spec    *EventAPISpec `json:"spec"`
	Version *Version      `json:"version"`
}

type EventAPIDefinitionInput

type EventAPIDefinitionInput struct {
	Name        string             `json:"name"`
	Description *string            `json:"description"`
	Spec        *EventAPISpecInput `json:"spec"`
	Group       *string            `json:"group"`
	Version     *VersionInput      `json:"version"`
}

type EventAPIDefinitionPage

type EventAPIDefinitionPage struct {
	Data       []*EventAPIDefinition `json:"data"`
	PageInfo   *PageInfo             `json:"pageInfo"`
	TotalCount int                   `json:"totalCount"`
}

func (EventAPIDefinitionPage) IsPageable

func (EventAPIDefinitionPage) IsPageable()

type EventAPISpec

type EventAPISpec struct {
	Data         *CLOB            `json:"data"`
	Type         EventAPISpecType `json:"type"`
	Format       SpecFormat       `json:"format"`
	FetchRequest *FetchRequest    `json:"fetchRequest"`
}

type EventAPISpecInput

type EventAPISpecInput struct {
	Data          *CLOB              `json:"data"`
	EventSpecType EventAPISpecType   `json:"eventSpecType"`
	Format        SpecFormat         `json:"format"`
	FetchRequest  *FetchRequestInput `json:"fetchRequest"`
}

type EventAPISpecType

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

func (EventAPISpecType) IsValid

func (e EventAPISpecType) IsValid() bool

func (EventAPISpecType) MarshalGQL

func (e EventAPISpecType) MarshalGQL(w io.Writer)

func (EventAPISpecType) String

func (e EventAPISpecType) String() string

func (*EventAPISpecType) UnmarshalGQL

func (e *EventAPISpecType) UnmarshalGQL(v interface{}) error

type FetchMode

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

func (FetchMode) IsValid

func (e FetchMode) IsValid() bool

func (FetchMode) MarshalGQL

func (e FetchMode) MarshalGQL(w io.Writer)

func (FetchMode) String

func (e FetchMode) String() string

func (*FetchMode) UnmarshalGQL

func (e *FetchMode) UnmarshalGQL(v interface{}) error

type FetchRequest

type FetchRequest struct {
	URL    string              `json:"url"`
	Auth   *Auth               `json:"auth"`
	Mode   FetchMode           `json:"mode"`
	Filter *string             `json:"filter"`
	Status *FetchRequestStatus `json:"status"`
}

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

type FetchRequestInput

type FetchRequestInput struct {
	URL    string     `json:"url"`
	Auth   *AuthInput `json:"auth"`
	Mode   *FetchMode `json:"mode"`
	Filter *string    `json:"filter"`
}

type FetchRequestStatus

type FetchRequestStatus struct {
	Condition FetchRequestStatusCondition `json:"condition"`
	Timestamp Timestamp                   `json:"timestamp"`
}

type FetchRequestStatusCondition

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

func (FetchRequestStatusCondition) IsValid

func (e FetchRequestStatusCondition) IsValid() bool

func (FetchRequestStatusCondition) MarshalGQL

func (e FetchRequestStatusCondition) MarshalGQL(w io.Writer)

func (FetchRequestStatusCondition) String

func (*FetchRequestStatusCondition) UnmarshalGQL

func (e *FetchRequestStatusCondition) UnmarshalGQL(v interface{}) error

type FilterOperator

type FilterOperator string
const (
	FilterOperatorAll FilterOperator = "ALL"
	FilterOperatorAny FilterOperator = "ANY"
)

func (FilterOperator) IsValid

func (e FilterOperator) IsValid() bool

func (FilterOperator) MarshalGQL

func (e FilterOperator) MarshalGQL(w io.Writer)

func (FilterOperator) String

func (e FilterOperator) String() string

func (*FilterOperator) UnmarshalGQL

func (e *FilterOperator) UnmarshalGQL(v interface{}) error

type HealthCheck

type HealthCheck struct {
	Type      HealthCheckType            `json:"type"`
	Condition HealthCheckStatusCondition `json:"condition"`
	Origin    *string                    `json:"origin"`
	Message   *string                    `json:"message"`
	Timestamp Timestamp                  `json:"timestamp"`
}

type HealthCheckPage

type HealthCheckPage struct {
	Data       []*HealthCheck `json:"data"`
	PageInfo   *PageInfo      `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

func (HealthCheckPage) IsPageable

func (HealthCheckPage) IsPageable()

type HealthCheckStatusCondition

type HealthCheckStatusCondition string
const (
	HealthCheckStatusConditionSucceeded HealthCheckStatusCondition = "SUCCEEDED"
	HealthCheckStatusConditionFailed    HealthCheckStatusCondition = "FAILED"
)

func (HealthCheckStatusCondition) IsValid

func (e HealthCheckStatusCondition) IsValid() bool

func (HealthCheckStatusCondition) MarshalGQL

func (e HealthCheckStatusCondition) MarshalGQL(w io.Writer)

func (HealthCheckStatusCondition) String

func (*HealthCheckStatusCondition) UnmarshalGQL

func (e *HealthCheckStatusCondition) UnmarshalGQL(v interface{}) error

type HealthCheckType

type HealthCheckType string
const (
	HealthCheckTypeManagementPlaneApplicationHealthcheck HealthCheckType = "MANAGEMENT_PLANE_APPLICATION_HEALTHCHECK"
)

func (HealthCheckType) IsValid

func (e HealthCheckType) IsValid() bool

func (HealthCheckType) MarshalGQL

func (e HealthCheckType) MarshalGQL(w io.Writer)

func (HealthCheckType) String

func (e HealthCheckType) String() string

func (*HealthCheckType) UnmarshalGQL

func (e *HealthCheckType) UnmarshalGQL(v interface{}) error

type HttpHeaders

type HttpHeaders map[string][]string

func (HttpHeaders) MarshalGQL

func (y HttpHeaders) MarshalGQL(w io.Writer)

func (*HttpHeaders) UnmarshalGQL

func (y *HttpHeaders) UnmarshalGQL(v interface{}) error

type Label

type Label struct {
	Key    string   `json:"key"`
	Values []string `json:"values"`
}

type LabelFilter

type LabelFilter struct {
	Label    string          `json:"label"`
	Values   []string        `json:"values"`
	Operator *FilterOperator `json:"operator"`
}

type Labels

type Labels map[string][]string

func (Labels) MarshalGQL

func (y Labels) MarshalGQL(w io.Writer)

func (*Labels) UnmarshalGQL

func (y *Labels) UnmarshalGQL(v interface{}) error

type MutationResolver

type MutationResolver interface {
	CreateApplication(ctx context.Context, in ApplicationInput) (*Application, error)
	UpdateApplication(ctx context.Context, id string, in ApplicationInput) (*Application, error)
	DeleteApplication(ctx context.Context, id string) (*Application, error)
	AddApplicationLabel(ctx context.Context, applicationID string, key string, values []string) (*Label, error)
	DeleteApplicationLabel(ctx context.Context, applicationID string, key string, values []string) (*Label, error)
	AddApplicationAnnotation(ctx context.Context, applicationID string, key string, value interface{}) (*Annotation, error)
	DeleteApplicationAnnotation(ctx context.Context, applicationID string, key string) (*Annotation, error)
	AddApplicationWebhook(ctx context.Context, applicationID string, in ApplicationWebhookInput) (*ApplicationWebhook, error)
	UpdateApplicationWebhook(ctx context.Context, webhookID string, in ApplicationWebhookInput) (*ApplicationWebhook, error)
	DeleteApplicationWebhook(ctx context.Context, webhookID string) (*ApplicationWebhook, error)
	AddAPI(ctx context.Context, applicationID string, in APIDefinitionInput) (*APIDefinition, error)
	UpdateAPI(ctx context.Context, id string, in APIDefinitionInput) (*APIDefinition, error)
	DeleteAPI(ctx context.Context, id string) (*APIDefinition, error)
	RefetchAPISpec(ctx context.Context, apiID string) (*APISpec, error)
	SetAPIAuth(ctx context.Context, apiID string, runtimeID string, in AuthInput) (*RuntimeAuth, error)
	DeleteAPIAuth(ctx context.Context, apiID string, runtimeID string) (*RuntimeAuth, error)
	AddEventAPI(ctx context.Context, applicationID string, in EventAPIDefinitionInput) (*EventAPIDefinition, error)
	UpdateEventAPI(ctx context.Context, id string, in EventAPIDefinitionInput) (*EventAPIDefinition, error)
	DeleteEventAPI(ctx context.Context, id string) (*EventAPIDefinition, error)
	RefetchEventAPISpec(ctx context.Context, eventID string) (*EventAPISpec, error)
	AddDocument(ctx context.Context, applicationID string, in DocumentInput) (*Document, error)
	DeleteDocument(ctx context.Context, id string) (*Document, error)
	CreateRuntime(ctx context.Context, in RuntimeInput) (*Runtime, error)
	UpdateRuntime(ctx context.Context, id string, in RuntimeInput) (*Runtime, error)
	DeleteRuntime(ctx context.Context, id string) (*Runtime, error)
	AddRuntimeLabel(ctx context.Context, runtimeID string, key string, values []string) (*Label, error)
	DeleteRuntimeLabel(ctx context.Context, runtimeID string, key string, values []string) (*Label, error)
	AddRuntimeAnnotation(ctx context.Context, runtimeID string, key string, value interface{}) (*Annotation, error)
	DeleteRuntimeAnnotation(ctx context.Context, runtimeID string, key string) (*Annotation, error)
}

type OAuthCredentialData

type OAuthCredentialData struct {
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
	URL          string `json:"url"`
}

func (OAuthCredentialData) IsCredentialData

func (OAuthCredentialData) IsCredentialData()

type OAuthCredentialDataInput

type OAuthCredentialDataInput struct {
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
	URL          string `json:"url"`
}

type PageCursor

type PageCursor string

func (PageCursor) MarshalGQL

func (y PageCursor) MarshalGQL(w io.Writer)

func (*PageCursor) UnmarshalGQL

func (y *PageCursor) UnmarshalGQL(v interface{}) error

type PageInfo

type PageInfo struct {
	StartCursor PageCursor `json:"startCursor"`
	EndCursor   PageCursor `json:"endCursor"`
	HasNextPage bool       `json:"hasNextPage"`
}

type Pageable

type Pageable interface {
	IsPageable()
}
Every query that implements pagination returns object that implements Pageable interface.

To specify page details, query specify two parameters: `first` and `after`. `first` specify page size, `after` is a cursor for the next page. When requesting first page, set `after` to empty value. For requesting next page, set `after` to `pageInfo.endCursor` returned from previous query.

type QueryParams

type QueryParams map[string][]string

func (QueryParams) MarshalGQL

func (y QueryParams) MarshalGQL(w io.Writer)

func (*QueryParams) UnmarshalGQL

func (y *QueryParams) UnmarshalGQL(v interface{}) error

type QueryResolver

type QueryResolver interface {
	Applications(ctx context.Context, filter []*LabelFilter, first *int, after *PageCursor) (*ApplicationPage, error)
	Application(ctx context.Context, id string) (*Application, error)
	Runtimes(ctx context.Context, filter []*LabelFilter, first *int, after *PageCursor) (*RuntimePage, error)
	Runtime(ctx context.Context, id string) (*Runtime, error)
	HealthChecks(ctx context.Context, types []HealthCheckType, origin *string, first *int, after *PageCursor) (*HealthCheckPage, error)
}

type ResolverRoot

type ResolverRoot interface {
	Application() ApplicationResolver
	Mutation() MutationResolver
	Query() QueryResolver
}

type Runtime

type Runtime struct {
	ID          string         `json:"id"`
	Name        string         `json:"name"`
	Description *string        `json:"description"`
	Labels      Labels         `json:"labels"`
	Annotations Annotations    `json:"annotations"`
	Status      *RuntimeStatus `json:"status"`
	// TODO: directive for checking auth
	AgentAuth *Auth `json:"agentAuth"`
}

type RuntimeAuth

type RuntimeAuth struct {
	RuntimeID string `json:"runtimeID"`
	Auth      *Auth  `json:"auth"`
}

type RuntimeInput

type RuntimeInput struct {
	Name        string       `json:"name"`
	Description *string      `json:"description"`
	Labels      *Labels      `json:"labels"`
	Annotations *Annotations `json:"annotations"`
}

type RuntimePage

type RuntimePage struct {
	Data       []*Runtime `json:"data"`
	PageInfo   *PageInfo  `json:"pageInfo"`
	TotalCount int        `json:"totalCount"`
}

func (RuntimePage) IsPageable

func (RuntimePage) IsPageable()

type RuntimeStatus

type RuntimeStatus struct {
	Condition RuntimeStatusCondition `json:"condition"`
	Timestamp Timestamp              `json:"timestamp"`
}

type RuntimeStatusCondition

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

func (RuntimeStatusCondition) IsValid

func (e RuntimeStatusCondition) IsValid() bool

func (RuntimeStatusCondition) MarshalGQL

func (e RuntimeStatusCondition) MarshalGQL(w io.Writer)

func (RuntimeStatusCondition) String

func (e RuntimeStatusCondition) String() string

func (*RuntimeStatusCondition) UnmarshalGQL

func (e *RuntimeStatusCondition) UnmarshalGQL(v interface{}) error

type SpecFormat

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

func (SpecFormat) IsValid

func (e SpecFormat) IsValid() bool

func (SpecFormat) MarshalGQL

func (e SpecFormat) MarshalGQL(w io.Writer)

func (SpecFormat) String

func (e SpecFormat) String() string

func (*SpecFormat) UnmarshalGQL

func (e *SpecFormat) UnmarshalGQL(v interface{}) error

type Timestamp

type Timestamp time.Time

func (Timestamp) MarshalGQL

func (y Timestamp) MarshalGQL(w io.Writer)

func (*Timestamp) UnmarshalGQL

func (y *Timestamp) UnmarshalGQL(v interface{}) error

func (*Timestamp) UnmarshalJSON

func (y *Timestamp) UnmarshalJSON(in []byte) error

UnmarshalJSON is used only by integration tests

type Version

type Version struct {
	// for example 4.6
	Value      string `json:"value"`
	Deprecated *bool  `json:"deprecated"`
	// for example 4.5
	DeprecatedSince *string `json:"deprecatedSince"`
	// if true, will be removed in the next version
	ForRemoval *bool `json:"forRemoval"`
}

type VersionInput

type VersionInput struct {
	Value           string  `json:"value"`
	Deprecated      *bool   `json:"deprecated"`
	DeprecatedSince *string `json:"deprecatedSince"`
	ForRemoval      *bool   `json:"forRemoval"`
}

Jump to

Keyboard shortcuts

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