typing

package
v0.5.3-beta Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MaxFileSize int64 = 10_485_760

Variables

This section is empty.

Functions

func IsBoolean

func IsBoolean(s string) bool

func IsEnum

func IsEnum(s string, separator string, allowedValues string) bool

func IsFile

func IsFile(f string) bool

func IsNumber

func IsNumber(s string) bool

Types

type InputField

type InputField struct {
	Name             *string `json:"name"`
	ShortDescription *string `json:"short_description,omitempty"`
	Description      *string `json:"description,omitempty"`
	Variable         *string `json:"variable"`
	Type             Type    `json:"type"`
	Default          *string `json:"default,omitempty"`
	Validator        *string `json:"validator,omitempty"`
	Separator        *string `json:"separator,omitempty"`
	AllowedValues    *string `json:"allowed_values,omitempty"`
	Required         bool    `json:"required,omitempty"`
	MountPath        *string `json:"mount_path,omitempty"`
	Requires         *string `json:"requires,omitempty"`
	MutuallyExcludes *string `json:"mutually_excludes,omitempty"`
}

func (*InputField) UnmarshalJSON

func (f *InputField) UnmarshalJSON(data []byte) error

func (*InputField) Validate

func (f *InputField) Validate(value *string) (*string, error)

type Type

type Type int64
const (
	String Type = iota
	Boolean
	Number
	Enum
	Unknown
	File
	FileBase64
)

func ToType

func ToType(s string) Type

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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