apimodel

package
v0.0.0-...-64402aa Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObjectTypeObject    = "object"
	ObjectTypeScalar    = "scalar"
	ObjectTypePayload   = "payload"
	ObjectTypeException = "exception"
	ObjectTypeList      = "list"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// This is basically the package name in aws-sdk-go/services/
	AliasLower string
	// And this is the sometimes-titlecased alias from the metadata.json file
	// in the aws-sdk-go/services/$alias_lower/$version directory
	Alias    string
	FullName string
	Protocol string
	Version  string
	// contains filtered or unexported fields
}

func New

func New(serviceAlias string, sdkHelper *model.SDKHelper) (*API, error)

func (*API) GetObjects

func (a *API) GetObjects(filter *ObjectFilter) []*Object

GetObjects returns objects that match any of the supplied filter

func (*API) GetOperations

func (a *API) GetOperations(filter *OperationFilter) []*Operation

GetOperations returns a map, keyed by the operation Name/ID, of OpenAPI Operation structs

func (*API) Schema

func (a *API) Schema() *oai.Swagger

type Object

type Object struct {
	Name     string
	Type     string
	DataType string
}

type ObjectFilter

type ObjectFilter struct {
	Types    []string
	Prefixes []string
}

type Operation

type Operation struct {
	Name   string
	Method string
}

type OperationFilter

type OperationFilter struct {
	Methods  []string
	Prefixes []string
}

type Resource

type Resource struct {
	SingularName string
	PluralName   string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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