api

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPageOutOfRange = fmt.Errorf("page out of range")
)

Functions

func GetLeafOutputs added in v0.3.0

func GetLeafOutputs(ctx context.Context, dag []dag.Node[dag.IOSpec]) []string

getLeafOutputs returns the outputs of the leaf nodes in the DAG

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func NewAmplifyAPI

func NewAmplifyAPI(er item.QueueRepository, tf task.TaskFactory, analytics analytics.AnalyticsRepository) (*amplifyAPI, error)

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type Attributes added in v0.5.0

type Attributes = map[string]interface{}

Attributes Members of the attributes object (`attributes`) represent information about the resource object in which it's defined.

type Datum added in v0.5.0

type Datum struct {
	// Data Resource objects appear in a JSON API document to represent resources.
	Data *Resource `json:"data,omitempty"`
}

Datum singular item

type Empty added in v0.5.0

type Empty = Nulltype

Empty OAS doesn't allow the null type so use this.

type Error

type Error struct {
	// Code An application-specific error code, expressed as a string value.
	Code *string `json:"code,omitempty"`

	// Detail A human-readable explanation specific to this occurrence of the problem.
	Detail *string `json:"detail,omitempty"`

	// Id A unique identifier for this particular occurrence of the problem.
	Id    *string          `json:"id,omitempty"`
	Links *map[string]Link `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta   *map[string]interface{} `json:"meta,omitempty"`
	Source *ErrorSource            `json:"source,omitempty"`

	// Status The HTTP status code applicable to this problem, expressed as a string value.
	Status *string `json:"status,omitempty"`

	// Title A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization.
	Title *string `json:"title,omitempty"`
}

Error defines model for error.

type ErrorSource added in v0.5.0

type ErrorSource struct {
	// Parameter A string indicating which query parameter caused the error.
	Parameter *string `json:"parameter,omitempty"`

	// Pointer A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute].
	Pointer *string `json:"pointer,omitempty"`
}

ErrorSource defines model for error_source.

type ExecutionRequest

type ExecutionRequest struct {
	Cid string `json:"cid"`
}

ExecutionRequest defines model for ExecutionRequest.

type Failure added in v0.5.0

type Failure struct {
	Errors []Error `json:"errors"`

	// Jsonapi An object describing the server's implementation
	Jsonapi *Jsonapi         `json:"jsonapi,omitempty"`
	Links   *map[string]Link `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`
}

Failure defines model for failure.

type GetV0AnalyticsResultsResultMetadataKeyParams added in v0.5.2

type GetV0AnalyticsResultsResultMetadataKeyParams struct {
	// PageSize size of page for paginated results
	PageSize *int32 `form:"page[size],omitempty" json:"page[size],omitempty"`
}

GetV0AnalyticsResultsResultMetadataKeyParams defines parameters for GetV0AnalyticsResultsResultMetadataKey.

type GetV0GraphParams added in v0.5.0

type GetV0GraphParams struct {
	// PageSize size of page for paginated results
	PageSize *int32 `form:"page[size],omitempty" json:"page[size],omitempty"`

	// PageNumber page number of results
	PageNumber *int32 `form:"page[number],omitempty" json:"page[number],omitempty"`
}

GetV0GraphParams defines parameters for GetV0Graph.

type GetV0JobsParams added in v0.5.0

type GetV0JobsParams struct {
	// PageSize size of page for paginated results
	PageSize *int32 `form:"page[size],omitempty" json:"page[size],omitempty"`

	// PageNumber page number of results
	PageNumber *int32 `form:"page[number],omitempty" json:"page[number],omitempty"`
}

GetV0JobsParams defines parameters for GetV0Jobs.

type GetV0QueueParams added in v0.4.0

type GetV0QueueParams struct {
	// Sort [fields to sort by](https://jsonapi.org/format/#fetching-sorting)
	Sort *string `form:"sort,omitempty" json:"sort,omitempty"`

	// PageSize size of page for paginated results
	PageSize *int32 `form:"page[size],omitempty" json:"page[size],omitempty"`

	// PageNumber page number of results
	PageNumber *int32 `form:"page[number],omitempty" json:"page[number],omitempty"`
}

GetV0QueueParams defines parameters for GetV0Queue.

type GorillaServerOptions

type GorillaServerOptions struct {
	BaseURL          string
	BaseRouter       *mux.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type GraphCollection added in v0.5.0

type GraphCollection struct {
	Data []NodeSpec `json:"data"`

	// Jsonapi An object describing the server's implementation
	Jsonapi *Jsonapi `json:"jsonapi,omitempty"`

	// Links Link members related to the primary data.
	Links *PaginationLinks `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`
}

GraphCollection defines model for GraphCollection.

type GraphCollectionData added in v0.5.0

type GraphCollectionData = []NodeSpec

GraphCollectionData defines model for GraphCollectionData.

type Id added in v0.5.0

type Id = string

Id [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification)

type Info added in v0.5.0

type Info struct {
	// Jsonapi An object describing the server's implementation
	Jsonapi *Jsonapi         `json:"jsonapi,omitempty"`
	Links   *map[string]Link `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta map[string]interface{} `json:"meta"`
}

Info defines model for info.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type ItemResult added in v0.3.0

type ItemResult struct {
	// Id External execution ID
	Id *string `json:"id,omitempty"`

	// Skipped Whether this node was skipped due to predicates not matching.
	Skipped *bool   `json:"skipped,omitempty"`
	Stderr  *string `json:"stderr,omitempty"`
	Stdout  *string `json:"stdout,omitempty"`
}

ItemResult defines model for ItemResult.

type Job

type Job struct {
	Entrypoint *[]string `json:"entrypoint,omitempty"`
	Id         string    `json:"id"`
	Image      string    `json:"image"`
	Links      *Links    `json:"links,omitempty"`
	Type       string    `json:"type"`
}

Job defines model for job.

type JobCollection added in v0.5.0

type JobCollection struct {
	Data []JobSpec `json:"data"`

	// Jsonapi An object describing the server's implementation
	Jsonapi *Jsonapi `json:"jsonapi,omitempty"`

	// Links Link members related to the primary data.
	Links *PaginationLinks `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`
}

JobCollection defines model for JobCollection.

type JobCollectionData added in v0.5.0

type JobCollectionData = []JobSpec

JobCollectionData defines model for JobCollectionData.

type JobDatum added in v0.5.0

type JobDatum struct {
	Data *JobSpec `json:"data,omitempty"`
}

JobDatum singular item

type JobSpec added in v0.5.0

type JobSpec struct {
	// Attributes Node attributes
	Attributes *JobSpecAttributes `json:"attributes,omitempty"`

	// Id [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification)
	Id    string           `json:"id"`
	Links *map[string]Link `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`

	// Relationships Members of the relationships object represent references from the resource object in which it's defined to other resource objects. N.B. this is validation, not useful for inclusion.
	Relationships *map[string]Relationship `json:"relationships,omitempty"`

	// Type [resource object type](https://jsonapi.org/format/#document-resource-object-identification)
	Type string `json:"type"`
}

JobSpec defines model for JobSpec.

type JobSpecAttributes added in v0.5.0

type JobSpecAttributes struct {
	Entrypoint []string `json:"entrypoint"`
	Image      string   `json:"image"`
}

JobSpecAttributes Node attributes

type Jsonapi added in v0.5.0

type Jsonapi struct {
	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta    *map[string]interface{} `json:"meta,omitempty"`
	Version *string                 `json:"version,omitempty"`
}

Jsonapi An object describing the server's implementation

type Link = string

Link A string containing the link's URL.

type Linkage added in v0.5.0

type Linkage struct {
	Id string `json:"id"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`
	Type string                  `json:"type"`
}

Linkage The `type` and `id` to non-empty members.

type Links map[string]Link

Links defines model for links.

type Meta added in v0.5.0

type Meta map[string]interface{}

Meta Non-standard meta-information that can not be represented as an attribute or relationship.

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

type Node

type Node struct {
	Attributes *NodeAttributes `json:"attributes,omitempty"`

	// Id [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification)
	Id    string           `json:"id"`
	Links *map[string]Link `json:"links,omitempty"`
	Meta  *QueueMetadata   `json:"meta,omitempty"`

	// Relationships Members of the relationships object represent references from the resource object in which it's defined to other resource objects. N.B. this is validation, not useful for inclusion.
	Relationships *map[string]Relationship `json:"relationships,omitempty"`

	// Type [resource object type](https://jsonapi.org/format/#document-resource-object-identification)
	Type string `json:"type"`
}

Node Node resource.

type NodeAttributes added in v0.5.0

type NodeAttributes struct {
	Children *[]Node             `json:"children,omitempty"`
	Inputs   []ExecutionRequest  `json:"inputs"`
	Outputs  *[]ExecutionRequest `json:"outputs,omitempty"`
	Result   *ItemResult         `json:"result,omitempty"`
}

NodeAttributes defines model for NodeAttributes.

type NodeInput

type NodeInput struct {
	NodeId    string `json:"node_id"`
	OutputId  string `json:"output_id"`
	Path      string `json:"path"`
	Predicate string `json:"predicate"`
	Root      bool   `json:"root"`
}

NodeInput defines model for NodeInput.

type NodeOutput

type NodeOutput struct {
	Id   string `json:"id"`
	Path string `json:"path"`
}

NodeOutput defines model for NodeOutput.

type NodeSpec added in v0.5.0

type NodeSpec struct {
	// Attributes Node attributes
	Attributes *NodeSpecAttributes `json:"attributes,omitempty"`

	// Id [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification)
	Id    string           `json:"id"`
	Links *map[string]Link `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`

	// Relationships Members of the relationships object represent references from the resource object in which it's defined to other resource objects. N.B. this is validation, not useful for inclusion.
	Relationships *map[string]Relationship `json:"relationships,omitempty"`

	// Type [resource object type](https://jsonapi.org/format/#document-resource-object-identification)
	Type string `json:"type"`
}

NodeSpec defines model for NodeSpec.

type NodeSpecAttributes added in v0.5.0

type NodeSpecAttributes struct {
	Inputs  []NodeInput   `json:"inputs"`
	JobId   string        `json:"job_id"`
	Outputs *[]NodeOutput `json:"outputs,omitempty"`
}

NodeSpecAttributes Node attributes

type Nulltype added in v0.5.0

type Nulltype = map[string]interface{}

Nulltype OAS doesn't allow the null type so use this.

type PageNumber added in v0.5.0

type PageNumber = int32

PageNumber defines model for pageNumber.

type PageSize added in v0.5.0

type PageSize = int32

PageSize defines model for pageSize.

type Pagination added in v0.5.0

type Pagination struct {
	// First The first page of data
	First *string `json:"first,omitempty"`

	// Last The last page of data
	Last *string `json:"last,omitempty"`

	// Next The next page of data
	Next *string `json:"next,omitempty"`

	// Prev The previous page of data
	Prev *string `json:"prev,omitempty"`
}

Pagination defines model for pagination.

type PaginationLinks struct {
	// First The first page of data
	First *string `json:"first,omitempty"`

	// Last The last page of data
	Last *string `json:"last,omitempty"`

	// Next The next page of data
	Next *string `json:"next,omitempty"`

	// Prev The previous page of data
	Prev                 *string         `json:"prev,omitempty"`
	AdditionalProperties map[string]Link `json:"-"`
}

PaginationLinks defines model for PaginationLinks.

func (PaginationLinks) Get added in v0.5.0

func (a PaginationLinks) Get(fieldName string) (value Link, found bool)

Getter for additional properties for PaginationLinks. Returns the specified element and whether it was found

func (PaginationLinks) MarshalJSON added in v0.5.0

func (a PaginationLinks) MarshalJSON() ([]byte, error)

Override default JSON handling for PaginationLinks to handle AdditionalProperties

func (*PaginationLinks) Set added in v0.5.0

func (a *PaginationLinks) Set(fieldName string, value Link)

Setter for additional properties for PaginationLinks

func (*PaginationLinks) UnmarshalJSON added in v0.5.0

func (a *PaginationLinks) UnmarshalJSON(b []byte) error

Override default JSON handling for PaginationLinks to handle AdditionalProperties

type PostV0QueueFormdataRequestBody added in v0.4.0

type PostV0QueueFormdataRequestBody = QueuePostDatum

PostV0QueueFormdataRequestBody defines body for PostV0Queue for application/x-www-form-urlencoded ContentType.

type PutV0QueueIdJSONRequestBody

type PutV0QueueIdJSONRequestBody = QueuePutDatum

PutV0QueueIdJSONRequestBody defines body for PutV0QueueId for application/json ContentType.

type QueueCollection added in v0.5.0

type QueueCollection struct {
	Data []QueueItem `json:"data"`

	// Jsonapi An object describing the server's implementation
	Jsonapi *Jsonapi `json:"jsonapi,omitempty"`

	// Links Link members related to the primary data.
	Links *PaginationLinks `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`
}

QueueCollection defines model for QueueCollection.

type QueueCollectionData added in v0.5.0

type QueueCollectionData = []QueueItem

QueueCollectionData defines model for QueueCollectionData.

type QueueDatum added in v0.5.0

type QueueDatum struct {
	// Data Node resource.
	Data *QueueItemDetail `json:"data,omitempty"`
}

QueueDatum singular item

type QueueItem added in v0.5.0

type QueueItem struct {
	// Attributes Members of the attributes object (`attributes`) represent information about the resource object in which it's defined.
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Id [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification)
	Id    string           `json:"id"`
	Links *map[string]Link `json:"links,omitempty"`
	Meta  *QueueMetadata   `json:"meta,omitempty"`

	// Relationships Members of the relationships object represent references from the resource object in which it's defined to other resource objects. N.B. this is validation, not useful for inclusion.
	Relationships *map[string]Relationship `json:"relationships,omitempty"`

	// Type [resource object type](https://jsonapi.org/format/#document-resource-object-identification)
	Type string `json:"type"`
}

QueueItem QueueItem

type QueueItemAttributes added in v0.5.0

type QueueItemAttributes struct {
	Graph   *[]Node             `json:"graph,omitempty"`
	Inputs  []ExecutionRequest  `json:"inputs"`
	Outputs *[]ExecutionRequest `json:"outputs,omitempty"`
}

QueueItemAttributes Node attributes

type QueueItemDetail added in v0.5.0

type QueueItemDetail struct {
	// Attributes Node attributes
	Attributes *QueueItemAttributes `json:"attributes,omitempty"`

	// Id [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification)
	Id    string           `json:"id"`
	Links *map[string]Link `json:"links,omitempty"`
	Meta  *QueueMetadata   `json:"meta,omitempty"`

	// Relationships Members of the relationships object represent references from the resource object in which it's defined to other resource objects. N.B. this is validation, not useful for inclusion.
	Relationships *map[string]Relationship `json:"relationships,omitempty"`

	// Type [resource object type](https://jsonapi.org/format/#document-resource-object-identification)
	Type string `json:"type"`
}

QueueItemDetail Node resource.

type QueueMetadata added in v0.5.0

type QueueMetadata struct {
	Ended     *string `json:"ended,omitempty"`
	Started   *string `json:"started,omitempty"`
	Status    string  `json:"status"`
	Submitted string  `json:"submitted"`
}

QueueMetadata defines model for QueueMetadata.

type QueuePostDatum added in v0.5.0

type QueuePostDatum struct {
	Cid string `json:"cid"`
}

QueuePostDatum defines model for QueuePostDatum.

type QueuePutAttributes added in v0.5.0

type QueuePutAttributes struct {
	Inputs []ExecutionRequest `json:"inputs"`
}

QueuePutAttributes defines model for QueuePutAttributes.

type QueuePutDatum added in v0.5.0

type QueuePutDatum struct {
	Data QueuePutResource `json:"data"`
}

QueuePutDatum singular item being [created](https://jsonapi.org/format/#crud-creating). `id` is optional and may be ignored if supplied and created by the system.

type QueuePutResource added in v0.5.0

type QueuePutResource struct {
	Attributes QueuePutAttributes `json:"attributes"`
}

QueuePutResource defines model for QueuePutResource.

type Relationship added in v0.5.0

type Relationship struct {
	// Data Member, whose value represents `resource linkage`.
	Data *Relationship_Data `json:"data,omitempty"`

	// Links A resource object **MAY** contain references to other resource objects (`relationships`). Relationships may be to-one or to-many. Relationships can be specified by including a member in a resource's links object.
	Links *RelationshipLinks `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`
	// contains filtered or unexported fields
}

Relationship A single relationship description

func (Relationship) AsRelationship0 added in v0.5.0

func (t Relationship) AsRelationship0() (Relationship0, error)

AsRelationship0 returns the union data inside the Relationship as a Relationship0

func (Relationship) AsRelationship1 added in v0.5.0

func (t Relationship) AsRelationship1() (Relationship1, error)

AsRelationship1 returns the union data inside the Relationship as a Relationship1

func (Relationship) AsRelationship2 added in v0.5.0

func (t Relationship) AsRelationship2() (Relationship2, error)

AsRelationship2 returns the union data inside the Relationship as a Relationship2

func (*Relationship) FromRelationship0 added in v0.5.0

func (t *Relationship) FromRelationship0(v Relationship0) error

FromRelationship0 overwrites any union data inside the Relationship as the provided Relationship0

func (*Relationship) FromRelationship1 added in v0.5.0

func (t *Relationship) FromRelationship1(v Relationship1) error

FromRelationship1 overwrites any union data inside the Relationship as the provided Relationship1

func (*Relationship) FromRelationship2 added in v0.5.0

func (t *Relationship) FromRelationship2(v Relationship2) error

FromRelationship2 overwrites any union data inside the Relationship as the provided Relationship2

func (Relationship) MarshalJSON added in v0.5.0

func (t Relationship) MarshalJSON() ([]byte, error)

func (*Relationship) MergeRelationship0 added in v0.5.0

func (t *Relationship) MergeRelationship0(v Relationship0) error

MergeRelationship0 performs a merge with any union data inside the Relationship, using the provided Relationship0

func (*Relationship) MergeRelationship1 added in v0.5.0

func (t *Relationship) MergeRelationship1(v Relationship1) error

MergeRelationship1 performs a merge with any union data inside the Relationship, using the provided Relationship1

func (*Relationship) MergeRelationship2 added in v0.5.0

func (t *Relationship) MergeRelationship2(v Relationship2) error

MergeRelationship2 performs a merge with any union data inside the Relationship, using the provided Relationship2

func (*Relationship) UnmarshalJSON added in v0.5.0

func (t *Relationship) UnmarshalJSON(b []byte) error

type Relationship0 added in v0.5.0

type Relationship0 = interface{}

Relationship0 defines model for .

type Relationship1 added in v0.5.0

type Relationship1 = interface{}

Relationship1 defines model for .

type Relationship2 added in v0.5.0

type Relationship2 = interface{}

Relationship2 defines model for .

type RelationshipLinks struct {
	// Related A string containing the link's URL.
	Related *string `json:"related,omitempty"`

	// Self A string containing the link's URL.
	Self                 *string                `json:"self,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

RelationshipLinks A resource object **MAY** contain references to other resource objects (`relationships`). Relationships may be to-one or to-many. Relationships can be specified by including a member in a resource's links object.

func (RelationshipLinks) Get added in v0.5.0

func (a RelationshipLinks) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for RelationshipLinks. Returns the specified element and whether it was found

func (RelationshipLinks) MarshalJSON added in v0.5.0

func (a RelationshipLinks) MarshalJSON() ([]byte, error)

Override default JSON handling for RelationshipLinks to handle AdditionalProperties

func (*RelationshipLinks) Set added in v0.5.0

func (a *RelationshipLinks) Set(fieldName string, value interface{})

Setter for additional properties for RelationshipLinks

func (*RelationshipLinks) UnmarshalJSON added in v0.5.0

func (a *RelationshipLinks) UnmarshalJSON(b []byte) error

Override default JSON handling for RelationshipLinks to handle AdditionalProperties

type RelationshipToMany added in v0.5.0

type RelationshipToMany = []Linkage

RelationshipToMany An array of objects each containing `type` and `id` members for to-many relationships.

type RelationshipToOne added in v0.5.0

type RelationshipToOne struct {
	// contains filtered or unexported fields
}

RelationshipToOne References to other resource objects in a to-one (`relationship`). Relationships can be specified by including a member in a resource's links object.

func (RelationshipToOne) AsEmpty added in v0.5.0

func (t RelationshipToOne) AsEmpty() (Empty, error)

AsEmpty returns the union data inside the RelationshipToOne as a Empty

func (RelationshipToOne) AsLinkage added in v0.5.0

func (t RelationshipToOne) AsLinkage() (Linkage, error)

AsLinkage returns the union data inside the RelationshipToOne as a Linkage

func (*RelationshipToOne) FromEmpty added in v0.5.0

func (t *RelationshipToOne) FromEmpty(v Empty) error

FromEmpty overwrites any union data inside the RelationshipToOne as the provided Empty

func (*RelationshipToOne) FromLinkage added in v0.5.0

func (t *RelationshipToOne) FromLinkage(v Linkage) error

FromLinkage overwrites any union data inside the RelationshipToOne as the provided Linkage

func (RelationshipToOne) MarshalJSON added in v0.5.0

func (t RelationshipToOne) MarshalJSON() ([]byte, error)

func (*RelationshipToOne) MergeEmpty added in v0.5.0

func (t *RelationshipToOne) MergeEmpty(v Empty) error

MergeEmpty performs a merge with any union data inside the RelationshipToOne, using the provided Empty

func (*RelationshipToOne) MergeLinkage added in v0.5.0

func (t *RelationshipToOne) MergeLinkage(v Linkage) error

MergeLinkage performs a merge with any union data inside the RelationshipToOne, using the provided Linkage

func (*RelationshipToOne) UnmarshalJSON added in v0.5.0

func (t *RelationshipToOne) UnmarshalJSON(b []byte) error

type Relationship_Data added in v0.5.0

type Relationship_Data struct {
	// contains filtered or unexported fields
}

Relationship_Data Member, whose value represents `resource linkage`.

func (Relationship_Data) AsRelationshipToMany added in v0.5.0

func (t Relationship_Data) AsRelationshipToMany() (RelationshipToMany, error)

AsRelationshipToMany returns the union data inside the Relationship_Data as a RelationshipToMany

func (Relationship_Data) AsRelationshipToOne added in v0.5.0

func (t Relationship_Data) AsRelationshipToOne() (RelationshipToOne, error)

AsRelationshipToOne returns the union data inside the Relationship_Data as a RelationshipToOne

func (*Relationship_Data) FromRelationshipToMany added in v0.5.0

func (t *Relationship_Data) FromRelationshipToMany(v RelationshipToMany) error

FromRelationshipToMany overwrites any union data inside the Relationship_Data as the provided RelationshipToMany

func (*Relationship_Data) FromRelationshipToOne added in v0.5.0

func (t *Relationship_Data) FromRelationshipToOne(v RelationshipToOne) error

FromRelationshipToOne overwrites any union data inside the Relationship_Data as the provided RelationshipToOne

func (Relationship_Data) MarshalJSON added in v0.5.0

func (t Relationship_Data) MarshalJSON() ([]byte, error)

func (*Relationship_Data) MergeRelationshipToMany added in v0.5.0

func (t *Relationship_Data) MergeRelationshipToMany(v RelationshipToMany) error

MergeRelationshipToMany performs a merge with any union data inside the Relationship_Data, using the provided RelationshipToMany

func (*Relationship_Data) MergeRelationshipToOne added in v0.5.0

func (t *Relationship_Data) MergeRelationshipToOne(v RelationshipToOne) error

MergeRelationshipToOne performs a merge with any union data inside the Relationship_Data, using the provided RelationshipToOne

func (*Relationship_Data) UnmarshalJSON added in v0.5.0

func (t *Relationship_Data) UnmarshalJSON(b []byte) error

type Relationships added in v0.5.0

type Relationships map[string]Relationship

Relationships Members of the relationships object represent references from the resource object in which it's defined to other resource objects. N.B. this is validation, not useful for inclusion.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type Resource added in v0.5.0

type Resource struct {
	// Attributes Members of the attributes object (`attributes`) represent information about the resource object in which it's defined.
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Id [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification)
	Id    string           `json:"id"`
	Links *map[string]Link `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`

	// Relationships Members of the relationships object represent references from the resource object in which it's defined to other resource objects. N.B. this is validation, not useful for inclusion.
	Relationships *map[string]Relationship `json:"relationships,omitempty"`

	// Type [resource object type](https://jsonapi.org/format/#document-resource-object-identification)
	Type string `json:"type"`
}

Resource Resource objects appear in a JSON API document to represent resources.

type ResultCollection added in v0.5.2

type ResultCollection struct {
	Data []ResultDatum `json:"data"`

	// Jsonapi An object describing the server's implementation
	Jsonapi *Jsonapi `json:"jsonapi,omitempty"`

	// Links Link members related to the primary data.
	Links *PaginationLinks `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`
}

ResultCollection defines model for ResultCollection.

type ResultCollectionData added in v0.5.2

type ResultCollectionData = []ResultDatum

ResultCollectionData defines model for ResultCollectionData.

type ResultDatum added in v0.5.2

type ResultDatum struct {
	// Attributes Members of the attributes object (`attributes`) represent information about the resource object in which it's defined.
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Id [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification)
	Id    string           `json:"id"`
	Links *map[string]Link `json:"links,omitempty"`

	// Meta Non-standard meta-information that can not be represented as an attribute or relationship.
	Meta *map[string]interface{} `json:"meta,omitempty"`

	// Relationships Members of the relationships object represent references from the resource object in which it's defined to other resource objects. N.B. this is validation, not useful for inclusion.
	Relationships *map[string]Relationship `json:"relationships,omitempty"`

	// Type [resource object type](https://jsonapi.org/format/#document-resource-object-identification)
	Type string `json:"type"`
}

ResultDatum defines model for ResultDatum.

type ServerInterface

type ServerInterface interface {
	// Amplify home
	// (GET /v0)
	GetV0(w http.ResponseWriter, r *http.Request)

	// (GET /v0/analytics/results/{result_metadata_key})
	GetV0AnalyticsResultsResultMetadataKey(w http.ResponseWriter, r *http.Request, resultMetadataKey string, params GetV0AnalyticsResultsResultMetadataKeyParams)
	// Amplify graph
	// (GET /v0/graph)
	GetV0Graph(w http.ResponseWriter, r *http.Request, params GetV0GraphParams)
	// Amplify jobs
	// (GET /v0/jobs)
	GetV0Jobs(w http.ResponseWriter, r *http.Request, params GetV0JobsParams)
	// Get a job by id
	// (GET /v0/jobs/{id})
	GetV0JobsId(w http.ResponseWriter, r *http.Request, id string)
	// Amplify work queue
	// (GET /v0/queue)
	GetV0Queue(w http.ResponseWriter, r *http.Request, params GetV0QueueParams)
	// Run all workflows for a CID (not recommended)
	// (POST /v0/queue)
	PostV0Queue(w http.ResponseWriter, r *http.Request)
	// Get an item from the queue by id
	// (GET /v0/queue/{id})
	GetV0QueueId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

	// (PUT /v0/queue/{id})
	PutV0QueueId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetV0

GetV0 operation middleware

func (*ServerInterfaceWrapper) GetV0AnalyticsResultsResultMetadataKey added in v0.5.2

func (siw *ServerInterfaceWrapper) GetV0AnalyticsResultsResultMetadataKey(w http.ResponseWriter, r *http.Request)

GetV0AnalyticsResultsResultMetadataKey operation middleware

func (*ServerInterfaceWrapper) GetV0Graph added in v0.1.0

func (siw *ServerInterfaceWrapper) GetV0Graph(w http.ResponseWriter, r *http.Request)

GetV0Graph operation middleware

func (*ServerInterfaceWrapper) GetV0Jobs

func (siw *ServerInterfaceWrapper) GetV0Jobs(w http.ResponseWriter, r *http.Request)

GetV0Jobs operation middleware

func (*ServerInterfaceWrapper) GetV0JobsId

func (siw *ServerInterfaceWrapper) GetV0JobsId(w http.ResponseWriter, r *http.Request)

GetV0JobsId operation middleware

func (*ServerInterfaceWrapper) GetV0Queue

func (siw *ServerInterfaceWrapper) GetV0Queue(w http.ResponseWriter, r *http.Request)

GetV0Queue operation middleware

func (*ServerInterfaceWrapper) GetV0QueueId

func (siw *ServerInterfaceWrapper) GetV0QueueId(w http.ResponseWriter, r *http.Request)

GetV0QueueId operation middleware

func (*ServerInterfaceWrapper) PostV0Queue added in v0.4.0

func (siw *ServerInterfaceWrapper) PostV0Queue(w http.ResponseWriter, r *http.Request)

PostV0Queue operation middleware

func (*ServerInterfaceWrapper) PutV0QueueId

func (siw *ServerInterfaceWrapper) PutV0QueueId(w http.ResponseWriter, r *http.Request)

PutV0QueueId operation middleware

type Sort added in v0.5.0

type Sort = string

Sort defines model for sort.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Type added in v0.5.0

type Type = string

Type [resource object type](https://jsonapi.org/format/#document-resource-object-identification)

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshallingParamError

type UnmarshallingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshallingParamError) Error

func (e *UnmarshallingParamError) Error() string

func (*UnmarshallingParamError) Unwrap

func (e *UnmarshallingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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