endpoint

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package endpoint implements different endpoint services required by the api-gateway service

Package endpoint implements different endpoint services required by the api-gateway service

Package endpoint implements different endpoint services required by the api-gateway service

Package endpoint implements different endpoint services required by the api-gateway service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUnknownError

func IsUnknownError(err error) bool

IsUnknownError indicates whether the error is of type UnknownError

func NewUnknownError

func NewUnknownError(message string) error

NewUnknownError creates a new UnknownError error

func NewUnknownErrorWithError

func NewUnknownErrorWithError(message string, err error) error

NewUnknownErrorWithError creates a new UnknownError error

Types

type EndpointCreatorContract

type EndpointCreatorContract interface {
	// GraphQLEndpoint creates GraphQL endpoint
	// Returns the GraphQL endpoint
	GraphQLEndpoint() endpoint.Endpoint
}

EndpointCreatorContract declares the contract that creates endpoints to create new edgeCluster, read, update and delete existing edgeClusters.

func NewEndpointCreatorService

func NewEndpointCreatorService(
	resolverCreator types.ResolverCreatorContract) (EndpointCreatorContract, error)

NewEndpointCreatorService creates new instance of the EndpointCreatorService, setting up all dependencies and returns the instance Returns the new service or error if something goes wrong

type GraphQLRequest

type GraphQLRequest struct {
	Query         string                 `json:"query"`
	OperationName string                 `json:"operationName"`
	Variables     map[string]interface{} `json:"variables"`
}

GraphQLRequest contains the request to process the GraphQL request

type GraphQLResponse

type GraphQLResponse struct {
	Err      error
	Response graphql.Response
}

GraphQLResponse contains the result of processing the GraphQL request

type UnknownError

type UnknownError struct {
	Message string
	Err     error
}

UnknownError indicates that an unknown error has happened<Paste>

func (UnknownError) Error

func (e UnknownError) Error() string

Error returns message for the UnknownError error type Returns the error nessage

func (UnknownError) Unwrap

func (e UnknownError) Unwrap() error

Unwrap returns the err if provided through NewUnknownErrorWithError function, otherwise returns nil

Directories

Path Synopsis
Package mock_endpoint is a generated GoMock package.
Package mock_endpoint is a generated GoMock package.

Jump to

Keyboard shortcuts

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