operations

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllOpRefsByRef

func AllOpRefsByRef(specDoc Provider, operationIDs []string) map[string]OpRef

AllOpRefsByRef returns an index of sortable operations

func GatherOperations

func GatherOperations(specDoc Provider, operationIDs []string) map[string]OpRef

GatherOperations builds a map of sorted operations from a spec

func OpRefsByRef

func OpRefsByRef(oprefs map[string]OpRef) map[string]OpRef

OpRefsByRef indexes a map of sortable operations

Types

type OpRef

type OpRef struct {
	Method string
	Path   string
	Key    string
	ID     string
	Op     *spec.Operation
	Ref    spec.Ref
}

OpRef is an indexable, sortable operation

type OpRefs

type OpRefs []OpRef

OpRefs is a sortable collection of operations

func (OpRefs) Len

func (o OpRefs) Len() int

func (OpRefs) Less

func (o OpRefs) Less(i, j int) bool

func (OpRefs) Swap

func (o OpRefs) Swap(i, j int)

type Provider

type Provider interface {
	Operations() map[string]map[string]*spec.Operation
}

Provider knows how to collect operations from a spec

Jump to

Keyboard shortcuts

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