metadata

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package metadata defines the structured metadata.

https://cloudinary.com/documentation/metadata_api

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AndValidation

func AndValidation(rules []interface{}) *compositeValidation

func GreaterThanValidation

func GreaterThanValidation(value interface{}, equals bool) *comparisonValidationRule

func LessThanValidation

func LessThanValidation(value interface{}, equals bool) *comparisonValidationRule

func StringLengthValidation

func StringLengthValidation(min, max int) *valueLengthValidationRule

Types

type DataSource

type DataSource struct {
	Values []DataSourceValue `json:"values"`
}

type DataSourceValue

type DataSourceValue struct {
	ExternalID string `json:"external_id"`
	Value      string `json:"value"`
	State      string `json:"state"`
}

type Field

type Field struct {
	Type         FieldType   `json:"type"`
	ExternalID   string      `json:"external_id"`
	Label        string      `json:"label"`
	Mandatory    bool        `json:"mandatory"`
	DefaultValue interface{} `json:"default_value,omitempty"`
	Validation   interface{} `json:"validation,omitempty"`
	DataSource   DataSource  `json:"datasource,omitempty"`
}

type FieldType

type FieldType string
const (
	StringFieldType  FieldType = "string"
	IntegerFieldType FieldType = "integer"
	DateFieldType    FieldType = "date"
	EnumFieldType    FieldType = "enum"
	SetFieldType     FieldType = "set"
)

type Validation

type Validation interface{}

type ValidationType

type ValidationType string

Jump to

Keyboard shortcuts

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