rest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackTick

func BackTick() string

func ExtractImports

func ExtractImports(s model.Struct) []string

func GetContentType

func GetContentType(operation model.Operation) string

func GetContextName

func GetContextName(o model.Operation) string

func GetExtractRequestContextMethod

func GetExtractRequestContextMethod(s model.Struct) string

func GetInputArgName

func GetInputArgName(o model.Operation) string

func GetInputArgType

func GetInputArgType(o model.Operation) string

func GetInputParamString

func GetInputParamString(o model.Operation) string

func GetMetaArg

func GetMetaArg(o model.Operation) *model.Field

func GetOutputArgDeclaration

func GetOutputArgDeclaration(o model.Operation) string

func GetOutputArgName

func GetOutputArgName(o model.Operation) string

func GetOutputArgType

func GetOutputArgType(o model.Operation) string

func GetOutputArgsDeclaration

func GetOutputArgsDeclaration(o model.Operation) []string

func GetRestOperationFilename

func GetRestOperationFilename(o model.Operation) string

func GetRestOperationFormat

func GetRestOperationFormat(o model.Operation) string

func GetRestOperationMethod

func GetRestOperationMethod(o model.Operation) string

func GetRestOperationPath

func GetRestOperationPath(o model.Operation) string

func GetRestOperationProducesEvents

func GetRestOperationProducesEvents(o model.Operation) string

func GetRestOperationProducesEventsAsSlice

func GetRestOperationProducesEventsAsSlice(o model.Operation) []string

func GetRestOperationRoles

func GetRestOperationRoles(o model.Operation) []string

func GetRestOperationRolesString

func GetRestOperationRolesString(o model.Operation) string

func GetRestServicePath

func GetRestServicePath(s model.Struct) string

func HasAnyPathParam

func HasAnyPathParam(o model.Operation) bool

func HasContentType

func HasContentType(operation model.Operation) bool

func HasContext

func HasContext(o model.Operation) bool

func HasInput

func HasInput(o model.Operation) bool

func HasMetaOutput

func HasMetaOutput(o model.Operation) bool

func HasOperationsWithInput

func HasOperationsWithInput(s model.Struct) bool

func HasOutput

func HasOutput(o model.Operation) bool

func HasRequestContext

func HasRequestContext(o model.Operation) bool

func HasRestOperationAfter

func HasRestOperationAfter(o model.Operation) bool

func HasUpload

func HasUpload(o model.Operation) bool

func IsBoolArg

func IsBoolArg(f model.Field) bool

func IsContextArg

func IsContextArg(f model.Field) bool

func IsDateArg

func IsDateArg(f model.Field) bool

func IsErrorArg

func IsErrorArg(f model.Field) bool

func IsInputArgMandatory

func IsInputArgMandatory(o model.Operation, arg model.Field) bool

func IsMetaCallback

func IsMetaCallback(o model.Operation) bool

func IsMetaCallbackArg

func IsMetaCallbackArg(f model.Field) bool

func IsNumberArg

func IsNumberArg(f model.Field) bool

func IsPrimitiveArg

func IsPrimitiveArg(f model.Field) bool

func IsQueryParam

func IsQueryParam(o model.Operation, arg model.Field) bool

func IsRequestContextArg

func IsRequestContextArg(f model.Field) bool

func IsRestOperation

func IsRestOperation(o model.Operation) bool

func IsRestOperationCSV

func IsRestOperationCSV(o model.Operation) bool

func IsRestOperationCustom

func IsRestOperationCustom(o model.Operation) bool

func IsRestOperationForm

func IsRestOperationForm(o model.Operation) bool

func IsRestOperationGenerated

func IsRestOperationGenerated(o model.Operation) bool

func IsRestOperationHTML

func IsRestOperationHTML(o model.Operation) bool

func IsRestOperationJSON

func IsRestOperationJSON(o model.Operation) bool

func IsRestOperationMD

func IsRestOperationMD(o model.Operation) bool

func IsRestOperationNoContent

func IsRestOperationNoContent(o model.Operation) bool

func IsRestOperationNoWrap

func IsRestOperationNoWrap(o model.Operation) bool

func IsRestOperationTXT

func IsRestOperationTXT(o model.Operation) bool

func IsRestOperationTransactional

func IsRestOperationTransactional(s model.Struct, o model.Operation) bool

func IsRestService

func IsRestService(s model.Struct) bool

func IsRestServiceNoTest

func IsRestServiceNoTest(s model.Struct) bool

func IsRestServiceNoValidation

func IsRestServiceNoValidation(s model.Struct) bool

func IsRestServiceUnprotected

func IsRestServiceUnprotected(s model.Struct) bool

func IsSliceParam

func IsSliceParam(arg model.Field) bool

func IsStringArg

func IsStringArg(f model.Field) bool

func IsStringSliceArg

func IsStringSliceArg(f model.Field) bool

func IsUploadArg

func IsUploadArg(f model.Field) bool

func NeedsContext

func NeedsContext(o model.Operation) bool

func NewGenerator

func NewGenerator() generator.Generator

func RequiresParamValidation

func RequiresParamValidation(o model.Operation) bool

func ReturnsError

func ReturnsError(o model.Operation) bool

func SurroundWithBackTicks

func SurroundWithBackTicks(body string) string

func ToFirstUpper

func ToFirstUpper(in string) string

Types

type Generator

type Generator struct {
}

func (*Generator) Generate

func (eg *Generator) Generate(inputDir string, parsedSource model.ParsedSources) error

func (*Generator) GetAnnotations

func (eg *Generator) GetAnnotations() []annotation.AnnotationDescriptor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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