types

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE_ACTION  = "action"
	TYPE_NONE    = "none"
	TYPE_DEFAULT = "type"

	SUBJECT = "subject"
)

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 IsValidSubject added in v0.2.2

func IsValidSubject(t map[string]Type, property string) bool

func IsValidTag added in v0.2.2

func IsValidTag(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 BaseVerbs added in v0.2.2

type BaseVerbs []string

type Property

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

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
	GetBaseVerbs() BaseVerbs
}

Jump to

Keyboard shortcuts

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