common

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextState            = "state"
	ContextCommonOptions    = "options"
	ContextGeneratorOptions = "generatorOptions"
)

Context key values

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextKey

type ContextKey string

ContextKey is a custom key type for contexts

type DescriptionMarkdown

type DescriptionMarkdown interface {
	DescriptionMarkdown() string
}

DescriptionMarkdown simply allows for getting markdown text.

type Options

type Options struct {
	DescriptionComments bool
	Comments            bool
}

Options provides information and settings for all parsers, transformers and targers.

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions returns the default options

type State

type State struct {
	// contains filtered or unexported fields
}

State is a shared state for an entire code generation process. TODO make it threadsafe if needed

func (*State) PackageAlias

func (s *State) PackageAlias(name, path string)

SpecData returns the specification data.

func (*State) PackageAliases

func (s *State) PackageAliases() map[string]string

SetSpecData sets specification data.

func (*State) SetSpecData

func (s *State) SetSpecData(data []byte)

SetSpecData sets specification data.

func (*State) SpecData

func (s *State) SpecData() []byte

SpecData returns the specification data.

Jump to

Keyboard shortcuts

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