types

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNilInterface

func IsNilInterface(i interface{}) bool

IsNilInterface returns whether the interface parameter is nil

func IsValidAction

func IsValidAction(t Type, action string) bool

func IsValidProperty

func IsValidProperty(t Type, property string) bool

func IsValidVerb

func IsValidVerb(t Type, verb string) bool

Types

type Action

type Action interface {
	GetName() string
	String() string
	GetProperty(name string) (ActionProperty, bool)
}

type ActionProperty

type ActionProperty interface {
	GetName() string
	String() string
}

type Property

type Property interface {
	GetName() string
	String() string
	GetProperty(name string) (SwaggerProperty, bool)
}

type SwaggerProperty

type SwaggerProperty interface {
	GetName() string
	String() string
}

type Type

type Type interface {
	GetGroup() string
	GetName() string
	GetVerbs() []Verb
	GetActions() map[string]Action
	String() string
	DefaultAction() string
	GetProperties() map[string]Property
}

func NewTypeFromOpenAPIv3

func NewTypeFromOpenAPIv3(spec []byte) ([]Type, error)

NewTypeFromOpenAPIv3 parses an Open API v3 spec and creates types for registration in seal parser.

type Verb

type Verb interface {
	GetName() string
	String() string
}

Jump to

Keyboard shortcuts

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