parserConfig

package
v0.0.0-...-a804c55 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is(s string) bool

Is check string is valid enum

Types

type Enum

type Enum int8

Enum main type

const (
	// RAML parser cache directory, type: string, default: ""
	CacheDirectory Enum = 1 + iota
	// RAML parser should check RAML version or not, type: bool, default: false
	CheckRAMLVersion
	// options pass to CheckValueAPIType, type: []CheckValueOption, default: []CheckValueOption{}
	CheckValueOptions
	// show RAML data when error occur, set < 0 to disable, type: int64, default: 4
	ErrorTraceDistance
	// RAML parser should ignore unused annotations, type: bool, default: false
	IgnoreUnusedAnnotation
	// RAML parser should ignore unused traits, type: bool, default: false
	IgnoreUnusedTrait
)

List all valid enum

func Parse

func Parse(s string) Enum

Parse string to enum

func (Enum) MarshalJSON

func (t Enum) MarshalJSON() ([]byte, error)

MarshalJSON return jsonfy []byte of enum

func (Enum) String

func (t Enum) String() string

func (*Enum) UnmarshalJSON

func (t *Enum) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON decode json data to enum

Jump to

Keyboard shortcuts

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