parser

package
v2.0.0-...-bff7708 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAction = fmt.Errorf("Action is not found, use one of the following [%s]",
	strings.Join(misc.ACTIONS, ", "))

ErrInvalidAction - invalid action

Functions

This section is empty.

Types

type Field

type Field struct {
	Key   string
	Value string
}

Field - single input field

type Parser

type Parser struct {
	Name          string
	Fields        []Field
	Actions       []string
	Relationships Relationships
	Validation    Validation
	OnlyModel     bool
	Public        bool
}

Parser object

func (*Parser) Parse

func (p *Parser) Parse(name, fields, actions string) error

Parse - parses input data

type Relationships

type Relationships map[string]string

Relationships - list of relationships

type Validation

type Validation map[string][]string

Validation - list of validations

Jump to

Keyboard shortcuts

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