directives

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDirective

func GetDirective(node ast.Node, dirName string) *ast.Directive

GetDirective gets a directive by name

func GetDirectiveArg

func GetDirectiveArg(node ast.Node, dirName, argName string) ast.Value

GetDirectiveArg returns nil if the argument was not found

func GetDirectiveArgBool

func GetDirectiveArgBool(node ast.Node, dirName, argName string) (bool, bool, error)

GetDirectiveArgBool returns `(false, false, nil)` if directive or argument was not found, or returns an `error` if it was found but it was not a boolean

func GetDirectiveArgEnum

func GetDirectiveArgEnum(node ast.Node, dirName, argName string) (string, bool, error)

GetDirectiveArgEnum returns `false` if directive or argument was not found, or returns an `error` if it was found but it was not a string

func GetDirectiveArgStr

func GetDirectiveArgStr(node ast.Node, dirName, argName string) (string, bool, error)

GetDirectiveArgStr returns `false` if directive or argument was not found, or returns an `error` if it was found but it was not a string

func GetDirectives

func GetDirectives(node ast.Node) []*ast.Directive

GetDirectives returns nil if the node does not have directives

func SetDirectives

func SetDirectives(node ast.Node, directives []*ast.Directive) bool

SetDirectives returns false if the node does not accept directives

Types

This section is empty.

Jump to

Keyboard shortcuts

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