bsonschema

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 7 Imported by: 0

README

bsonschema

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array bson.D

func NewArray

func NewArray() Array

func (Array) AllOf

func (spec Array) AllOf(a []Specification) Array

func (Array) AnyOf

func (spec Array) AnyOf(a []Specification) Array

func (Array) BSONDocument

func (spec Array) BSONDocument() bson.D

func (Array) BSONType

func (spec Array) BSONType() string

func (Array) Not

func (spec Array) Not(a Specification) Array

func (Array) OneOf

func (spec Array) OneOf(a []Specification) Array

func (Array) SetAdditionalItems

func (spec Array) SetAdditionalItems(value bool) Array

func (Array) SetAdditionalItemsSchema

func (spec Array) SetAdditionalItemsSchema(specification Specification) Array

func (Array) SetDescription

func (spec Array) SetDescription(d string) Array

func (Array) SetEnum

func (spec Array) SetEnum(a bson.A) Array

func (Array) SetItems

func (spec Array) SetItems(items Specification) Array

func (Array) SetItemsArray

func (spec Array) SetItemsArray(items []Specification) Array

func (Array) SetMaxItems

func (spec Array) SetMaxItems(value int) Array

func (Array) SetMaxLength

func (spec Array) SetMaxLength(value int) Array

func (Array) SetMinItems

func (spec Array) SetMinItems(value int) Array

func (Array) SetMinLength

func (spec Array) SetMinLength(value int) Array

func (Array) SetPattern

func (spec Array) SetPattern(value string) Array

func (Array) SetUniqueItems

func (spec Array) SetUniqueItems(value bool) Array

type BinData

type BinData bson.D

func NewBinData

func NewBinData() BinData

func (BinData) AllOf

func (spec BinData) AllOf(a []Specification) BinData

func (BinData) AnyOf

func (spec BinData) AnyOf(a []Specification) BinData

func (BinData) BSONDocument

func (spec BinData) BSONDocument() bson.D

func (BinData) BSONType

func (spec BinData) BSONType() string

func (BinData) Not

func (spec BinData) Not(a Specification) BinData

func (BinData) OneOf

func (spec BinData) OneOf(a []Specification) BinData

func (BinData) SetDescription

func (spec BinData) SetDescription(d string) BinData

func (BinData) SetEnum

func (spec BinData) SetEnum(a bson.A) BinData

type Bool

type Bool bson.D

func NewBool

func NewBool() Bool

func (Bool) AllOf

func (spec Bool) AllOf(a []Specification) Bool

func (Bool) AnyOf

func (spec Bool) AnyOf(a []Specification) Bool

func (Bool) BSONDocument

func (spec Bool) BSONDocument() bson.D

func (Bool) BSONType

func (spec Bool) BSONType() string

func (Bool) Not

func (spec Bool) Not(a Specification) Bool

func (Bool) OneOf

func (spec Bool) OneOf(a []Specification) Bool

func (Bool) SetDescription

func (spec Bool) SetDescription(d string) Bool

func (Bool) SetEnum

func (spec Bool) SetEnum(a bson.A) Bool

type Boolean

type Boolean bson.D

func NewBoolean

func NewBoolean() Boolean

func (Boolean) AllOf

func (spec Boolean) AllOf(a []Specification) Boolean

func (Boolean) AnyOf

func (spec Boolean) AnyOf(a []Specification) Boolean

func (Boolean) BSONDocument

func (spec Boolean) BSONDocument() bson.D

func (Boolean) BSONType

func (spec Boolean) BSONType() string

func (Boolean) Not

func (spec Boolean) Not(a Specification) Boolean

func (Boolean) OneOf

func (spec Boolean) OneOf(a []Specification) Boolean

func (Boolean) SetDescription

func (spec Boolean) SetDescription(d string) Boolean

func (Boolean) SetEnum

func (spec Boolean) SetEnum(a bson.A) Boolean

type Date

type Date bson.D

func NewDate

func NewDate() Date

func (Date) AllOf

func (spec Date) AllOf(a []Specification) Date

func (Date) AnyOf

func (spec Date) AnyOf(a []Specification) Date

func (Date) BSONDocument

func (spec Date) BSONDocument() bson.D

func (Date) BSONType

func (spec Date) BSONType() string

func (Date) Not

func (spec Date) Not(a Specification) Date

func (Date) OneOf

func (spec Date) OneOf(a []Specification) Date

func (Date) SetDescription

func (spec Date) SetDescription(d string) Date

func (Date) SetEnum

func (spec Date) SetEnum(a bson.A) Date

type Decimal

type Decimal bson.D

func NewDecimal

func NewDecimal() Decimal

func (Decimal) AllOf

func (spec Decimal) AllOf(a []Specification) Decimal

func (Decimal) AnyOf

func (spec Decimal) AnyOf(a []Specification) Decimal

func (Decimal) BSONDocument

func (spec Decimal) BSONDocument() bson.D

func (Decimal) BSONType

func (spec Decimal) BSONType() string

func (Decimal) Not

func (spec Decimal) Not(a Specification) Decimal

func (Decimal) OneOf

func (spec Decimal) OneOf(a []Specification) Decimal

func (Decimal) SetDescription

func (spec Decimal) SetDescription(d string) Decimal

func (Decimal) SetEnum

func (spec Decimal) SetEnum(a bson.A) Decimal

func (Decimal) SetExclusiveMaximum

func (spec Decimal) SetExclusiveMaximum(n primitive.Decimal128) Decimal

func (Decimal) SetExclusiveMinimum

func (spec Decimal) SetExclusiveMinimum(n primitive.Decimal128) Decimal

func (Decimal) SetMaximum

func (spec Decimal) SetMaximum(n primitive.Decimal128) Decimal

func (Decimal) SetMinimum

func (spec Decimal) SetMinimum(n primitive.Decimal128) Decimal

func (Decimal) SetMultipleOf

func (spec Decimal) SetMultipleOf(n primitive.Decimal128) Decimal

type Double

type Double bson.D

func NewDouble

func NewDouble() Double

func (Double) AllOf

func (spec Double) AllOf(a []Specification) Double

func (Double) AnyOf

func (spec Double) AnyOf(a []Specification) Double

func (Double) BSONDocument

func (spec Double) BSONDocument() bson.D

func (Double) BSONType

func (spec Double) BSONType() string

func (Double) Not

func (spec Double) Not(a Specification) Double

func (Double) OneOf

func (spec Double) OneOf(a []Specification) Double

func (Double) SetDescription

func (spec Double) SetDescription(d string) Double

func (Double) SetEnum

func (spec Double) SetEnum(a bson.A) Double

func (Double) SetExclusiveMaximum

func (spec Double) SetExclusiveMaximum(n float64) Double

func (Double) SetExclusiveMinimum

func (spec Double) SetExclusiveMinimum(n float64) Double

func (Double) SetMaximum

func (spec Double) SetMaximum(n float64) Double

func (Double) SetMinimum

func (spec Double) SetMinimum(n float64) Double

func (Double) SetMultipleOf

func (spec Double) SetMultipleOf(n float64) Double

type Int

type Int bson.D

func NewInt

func NewInt() Int

func (Int) AllOf

func (spec Int) AllOf(a []Specification) Int

func (Int) AnyOf

func (spec Int) AnyOf(a []Specification) Int

func (Int) BSONDocument

func (spec Int) BSONDocument() bson.D

func (Int) BSONType

func (spec Int) BSONType() string

func (Int) Not

func (spec Int) Not(a Specification) Int

func (Int) OneOf

func (spec Int) OneOf(a []Specification) Int

func (Int) SetDescription

func (spec Int) SetDescription(d string) Int

func (Int) SetEnum

func (spec Int) SetEnum(a bson.A) Int

func (Int) SetExclusiveMaximum

func (spec Int) SetExclusiveMaximum(n int32) Int

func (Int) SetExclusiveMinimum

func (spec Int) SetExclusiveMinimum(n int32) Int

func (Int) SetMaximum

func (spec Int) SetMaximum(n int32) Int

func (Int) SetMinimum

func (spec Int) SetMinimum(n int32) Int

func (Int) SetMultipleOf

func (spec Int) SetMultipleOf(n int32) Int

type Long

type Long bson.D

func NewLong

func NewLong() Long

func (Long) AllOf

func (spec Long) AllOf(a []Specification) Long

func (Long) AnyOf

func (spec Long) AnyOf(a []Specification) Long

func (Long) BSONDocument

func (spec Long) BSONDocument() bson.D

func (Long) BSONType

func (spec Long) BSONType() string

func (Long) Not

func (spec Long) Not(a Specification) Long

func (Long) OneOf

func (spec Long) OneOf(a []Specification) Long

func (Long) SetDescription

func (spec Long) SetDescription(d string) Long

func (Long) SetEnum

func (spec Long) SetEnum(a bson.A) Long

func (Long) SetExclusiveMaximum

func (spec Long) SetExclusiveMaximum(n int64) Long

func (Long) SetExclusiveMinimum

func (spec Long) SetExclusiveMinimum(n int64) Long

func (Long) SetMaximum

func (spec Long) SetMaximum(n int64) Long

func (Long) SetMinimum

func (spec Long) SetMinimum(n int64) Long

func (Long) SetMultipleOf

func (spec Long) SetMultipleOf(n int64) Long

type Null

type Null bson.D

func NewNull

func NewNull() Null

func (Null) AllOf

func (spec Null) AllOf(a []Specification) Null

func (Null) AnyOf

func (spec Null) AnyOf(a []Specification) Null

func (Null) BSONDocument

func (spec Null) BSONDocument() bson.D

func (Null) BSONType

func (spec Null) BSONType() string

func (Null) Not

func (spec Null) Not(a Specification) Null

func (Null) OneOf

func (spec Null) OneOf(a []Specification) Null

func (Null) SetDescription

func (spec Null) SetDescription(d string) Null

func (Null) SetEnum

func (spec Null) SetEnum(a bson.A) Null

type Object

type Object bson.D

func NewObject

func NewObject() Object

func NewObjectFromTypeWithTags

func NewObjectFromTypeWithTags(t reflect.Type) (Object, error)

func (Object) AllOf

func (spec Object) AllOf(a []Specification) Object

func (Object) AnyOf

func (spec Object) AnyOf(a []Specification) Object

func (Object) AppendPatternProperty

func (spec Object) AppendPatternProperty(expression string, specification Specification) Object

func (Object) AppendProperty

func (spec Object) AppendProperty(name string, required bool, specification Specification) Object

func (Object) AppendRequired

func (spec Object) AppendRequired(name string) Object

func (Object) BSONDocument

func (spec Object) BSONDocument() bson.D

func (Object) BSONType

func (spec Object) BSONType() string

func (Object) CheckStructTags

func (spec Object) CheckStructTags(t reflect.Type) error

func (Object) Not

func (spec Object) Not(a Specification) Object

func (Object) OneOf

func (spec Object) OneOf(a []Specification) Object

func (Object) SetAdditionalProperties

func (spec Object) SetAdditionalProperties(value bool) Object

func (Object) SetDescription

func (spec Object) SetDescription(d string) Object

func (Object) SetEnum

func (spec Object) SetEnum(a bson.A) Object

func (Object) SetMaxProperties

func (spec Object) SetMaxProperties(value bool) Object

func (Object) SetMinProperties

func (spec Object) SetMinProperties(value int) Object

func (Object) SetTitle

func (spec Object) SetTitle(value string) Object

type ObjectID

type ObjectID bson.D

func NewObjectID

func NewObjectID() ObjectID

func (ObjectID) AllOf

func (spec ObjectID) AllOf(a []Specification) ObjectID

func (ObjectID) AnyOf

func (spec ObjectID) AnyOf(a []Specification) ObjectID

func (ObjectID) BSONDocument

func (spec ObjectID) BSONDocument() bson.D

func (ObjectID) BSONType

func (spec ObjectID) BSONType() string

func (ObjectID) Not

func (spec ObjectID) Not(a Specification) ObjectID

func (ObjectID) OneOf

func (spec ObjectID) OneOf(a []Specification) ObjectID

func (ObjectID) SetDescription

func (spec ObjectID) SetDescription(d string) ObjectID

func (ObjectID) SetEnum

func (spec ObjectID) SetEnum(a bson.A) ObjectID

type Regex

type Regex bson.D

func NewRegex

func NewRegex() Regex

func (Regex) AllOf

func (spec Regex) AllOf(a []Specification) Regex

func (Regex) AnyOf

func (spec Regex) AnyOf(a []Specification) Regex

func (Regex) BSONDocument

func (spec Regex) BSONDocument() bson.D

func (Regex) BSONType

func (spec Regex) BSONType() string

func (Regex) Not

func (spec Regex) Not(a Specification) Regex

func (Regex) OneOf

func (spec Regex) OneOf(a []Specification) Regex

func (Regex) SetDescription

func (spec Regex) SetDescription(d string) Regex

func (Regex) SetEnum

func (spec Regex) SetEnum(a bson.A) Regex

type Specification

type Specification interface {
	BSONDocument() bson.D
	BSONType() string
}

type String

type String bson.D

func NewString

func NewString() String

func (String) AllOf

func (spec String) AllOf(a []Specification) String

func (String) AnyOf

func (spec String) AnyOf(a []Specification) String

func (String) BSONDocument

func (spec String) BSONDocument() bson.D

func (String) BSONType

func (spec String) BSONType() string

func (String) MaxLength

func (spec String) MaxLength(d int) String

func (String) MinLength

func (spec String) MinLength(d int) String

func (String) Not

func (spec String) Not(a Specification) String

func (String) OneOf

func (spec String) OneOf(a []Specification) String

func (String) SetDescription

func (spec String) SetDescription(d string) String

func (String) SetEnum

func (spec String) SetEnum(a bson.A) String

type Timestamp

type Timestamp bson.D

func NewTimestamp

func NewTimestamp() Timestamp

func (Timestamp) AllOf

func (spec Timestamp) AllOf(a []Specification) Timestamp

func (Timestamp) AnyOf

func (spec Timestamp) AnyOf(a []Specification) Timestamp

func (Timestamp) BSONDocument

func (spec Timestamp) BSONDocument() bson.D

func (Timestamp) BSONType

func (spec Timestamp) BSONType() string

func (Timestamp) Not

func (spec Timestamp) Not(a Specification) Timestamp

func (Timestamp) OneOf

func (spec Timestamp) OneOf(a []Specification) Timestamp

func (Timestamp) SetDescription

func (spec Timestamp) SetDescription(d string) Timestamp

func (Timestamp) SetEnum

func (spec Timestamp) SetEnum(a bson.A) Timestamp

type UUID

type UUID bson.D

func NewUUID

func NewUUID() UUID

func (UUID) AllOf

func (spec UUID) AllOf(a []Specification) UUID

func (UUID) AnyOf

func (spec UUID) AnyOf(a []Specification) UUID

func (UUID) BSONDocument

func (spec UUID) BSONDocument() bson.D

func (UUID) BSONType

func (spec UUID) BSONType() string

func (UUID) Not

func (spec UUID) Not(a Specification) UUID

func (UUID) OneOf

func (spec UUID) OneOf(a []Specification) UUID

func (UUID) SetDescription

func (spec UUID) SetDescription(d string) UUID

func (UUID) SetEnum

func (spec UUID) SetEnum(a bson.A) UUID

Jump to

Keyboard shortcuts

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