Help us shape the future of Go! Take the 2026 Go Developer Survey

models

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddDocumentsRequest

type AddDocumentsRequest struct {

	// The actual list of Objects.
	Documents []*Document `json:"documents" yaml:"documents"`

	// Name of the collection
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// Array of property names to be vectorized.
	PropertiesToVectorize []string `json:"propertiesToVectorize" yaml:"propertiesToVectorize"`
}

AddDocumentsRequest Add the documents to the collection.

swagger:model AddDocumentsRequest

func (*AddDocumentsRequest) ContextValidate

func (m *AddDocumentsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this add documents request based on the context it is used

func (*AddDocumentsRequest) MarshalBinary

func (m *AddDocumentsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddDocumentsRequest) UnmarshalBinary

func (m *AddDocumentsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddDocumentsRequest) Validate

func (m *AddDocumentsRequest) Validate(formats strfmt.Registry) error

Validate validates this add documents request

type Collection

type Collection struct {

	// The indexes of the collection for fairOS-dfs document store.
	Indexes []*Index `json:"indexes" yaml:"indexes"`

	// Name of the collection
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

Collection collection

swagger:model Collection

func (*Collection) ContextValidate

func (m *Collection) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this collection based on the context it is used

func (*Collection) MarshalBinary

func (m *Collection) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Collection) UnmarshalBinary

func (m *Collection) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Collection) Validate

func (m *Collection) Validate(formats strfmt.Registry) error

Validate validates this collection

type Document

type Document struct {

	// ID of the Object.
	// Format: uuid
	ID strfmt.UUID `json:"id,omitempty" yaml:"id,omitempty"`

	// properties
	Properties Property `json:"properties,omitempty" yaml:"properties,omitempty"`
}

Document document

swagger:model Document

func (*Document) ContextValidate

func (m *Document) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this document based on context it is used

func (*Document) MarshalBinary

func (m *Document) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Document) UnmarshalBinary

func (m *Document) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Document) Validate

func (m *Document) Validate(formats strfmt.Registry) error

Validate validates this document

type ErrorResponse

type ErrorResponse struct {

	// error
	Error []*ErrorResponseErrorItems0 `json:"error" yaml:"error"`
}

ErrorResponse An error response given by FaVe end-points.

swagger:model ErrorResponse

func (*ErrorResponse) ContextValidate

func (m *ErrorResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this error response based on the context it is used

func (*ErrorResponse) MarshalBinary

func (m *ErrorResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ErrorResponse) UnmarshalBinary

func (m *ErrorResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ErrorResponse) Validate

func (m *ErrorResponse) Validate(formats strfmt.Registry) error

Validate validates this error response

type ErrorResponseErrorItems0

type ErrorResponseErrorItems0 struct {

	// message
	Message string `json:"message,omitempty" yaml:"message,omitempty"`
}

ErrorResponseErrorItems0 error response error items0

swagger:model ErrorResponseErrorItems0

func (*ErrorResponseErrorItems0) ContextValidate

func (m *ErrorResponseErrorItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error response error items0 based on context it is used

func (*ErrorResponseErrorItems0) MarshalBinary

func (m *ErrorResponseErrorItems0) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ErrorResponseErrorItems0) UnmarshalBinary

func (m *ErrorResponseErrorItems0) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ErrorResponseErrorItems0) Validate

func (m *ErrorResponseErrorItems0) Validate(formats strfmt.Registry) error

Validate validates this error response error items0

type Index

type Index struct {

	// The filed name to index
	FieldName string `json:"fieldName,omitempty" yaml:"fieldName,omitempty"`

	// Type of the field to index. Types can be "string", "number", "map", "list"
	FieldType string `json:"fieldType,omitempty" yaml:"fieldType,omitempty"`
}

Index This is an object for specifying which fields to index in fairOS document store while Collection creation

swagger:model Index

func (*Index) ContextValidate

func (m *Index) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this index based on context it is used

func (*Index) MarshalBinary

func (m *Index) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Index) UnmarshalBinary

func (m *Index) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Index) Validate

func (m *Index) Validate(formats strfmt.Registry) error

Validate validates this index

type NearestDocumentsByVectorRequest added in v0.1.5

type NearestDocumentsByVectorRequest struct {

	// distance
	Distance float32 `json:"distance,omitempty" yaml:"distance,omitempty"`

	// limit
	Limit int64 `json:"limit,omitempty" yaml:"limit,omitempty"`

	// Name of the collection
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// The vector to search for
	Vector []float32 `json:"vector" yaml:"vector"`
}

NearestDocumentsByVectorRequest Get the nearest documents from the collection by vector

swagger:model NearestDocumentsByVectorRequest

func (*NearestDocumentsByVectorRequest) ContextValidate added in v0.1.5

func (m *NearestDocumentsByVectorRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this nearest documents by vector request based on context it is used

func (*NearestDocumentsByVectorRequest) MarshalBinary added in v0.1.5

func (m *NearestDocumentsByVectorRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*NearestDocumentsByVectorRequest) UnmarshalBinary added in v0.1.5

func (m *NearestDocumentsByVectorRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*NearestDocumentsByVectorRequest) Validate added in v0.1.5

Validate validates this nearest documents by vector request

type NearestDocumentsRequest

type NearestDocumentsRequest struct {

	// distance
	Distance float32 `json:"distance,omitempty" yaml:"distance,omitempty"`

	// limit
	Limit int64 `json:"limit,omitempty" yaml:"limit,omitempty"`

	// Name of the collection
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// The text to search for.
	Text string `json:"text,omitempty" yaml:"text,omitempty"`
}

NearestDocumentsRequest Get the nearest documents from the collection by text

swagger:model NearestDocumentsRequest

func (*NearestDocumentsRequest) ContextValidate

func (m *NearestDocumentsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this nearest documents request based on context it is used

func (*NearestDocumentsRequest) MarshalBinary

func (m *NearestDocumentsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*NearestDocumentsRequest) UnmarshalBinary

func (m *NearestDocumentsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*NearestDocumentsRequest) Validate

func (m *NearestDocumentsRequest) Validate(formats strfmt.Registry) error

Validate validates this nearest documents request

type NearestDocumentsResponse

type NearestDocumentsResponse struct {

	// The actual list of Objects.
	Documents []*Document `json:"documents" yaml:"documents"`

	// Name of the collection
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

NearestDocumentsResponse Response for the Nearest documents request

swagger:model NearestDocumentsResponse

func (*NearestDocumentsResponse) ContextValidate

func (m *NearestDocumentsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this nearest documents response based on the context it is used

func (*NearestDocumentsResponse) MarshalBinary

func (m *NearestDocumentsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*NearestDocumentsResponse) UnmarshalBinary

func (m *NearestDocumentsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*NearestDocumentsResponse) Validate

func (m *NearestDocumentsResponse) Validate(formats strfmt.Registry) error

Validate validates this nearest documents response

type OKResponse

type OKResponse struct {

	// message
	Message string `json:"message,omitempty" yaml:"message,omitempty"`
}

OKResponse An ok response given by FaVe end-points.

swagger:model OKResponse

func (*OKResponse) ContextValidate

func (m *OKResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this o k response based on context it is used

func (*OKResponse) MarshalBinary

func (m *OKResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OKResponse) UnmarshalBinary

func (m *OKResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OKResponse) Validate

func (m *OKResponse) Validate(formats strfmt.Registry) error

Validate validates this o k response

type Property

type Property interface{}

Property This is an open object, with OpenAPI Specification 3.0 this will be more detailed.

swagger:model Property

type PropertySchema

type PropertySchema interface{}

PropertySchema This is an open object, with OpenAPI Specification 3.0 this will be more detailed.

swagger:model PropertySchema

type VectorNearestDocumentsRequest added in v0.1.6

type VectorNearestDocumentsRequest struct {

	// distance
	Distance float32 `json:"distance,omitempty" yaml:"distance,omitempty"`

	// limit
	Limit int64 `json:"limit,omitempty" yaml:"limit,omitempty"`

	// Name of the collection
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// The vector to search for
	Vector []float64 `json:"vector" yaml:"vector"`
}

VectorNearestDocumentsRequest Get the nearest documents from the collection.

swagger:model VectorNearestDocumentsRequest

func (*VectorNearestDocumentsRequest) ContextValidate added in v0.1.6

func (m *VectorNearestDocumentsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this vector nearest documents request based on context it is used

func (*VectorNearestDocumentsRequest) MarshalBinary added in v0.1.6

func (m *VectorNearestDocumentsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*VectorNearestDocumentsRequest) UnmarshalBinary added in v0.1.6

func (m *VectorNearestDocumentsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*VectorNearestDocumentsRequest) Validate added in v0.1.6

func (m *VectorNearestDocumentsRequest) Validate(formats strfmt.Registry) error

Validate validates this vector nearest documents request

Jump to

Keyboard shortcuts

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