responses

package
v0.0.0-...-004ddcb Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationListResponse

type AnnotationListResponse struct {
	Count       int                    `json:"count"`
	Annotations []documents.Annotation `json:"annotations"`
}

type DataListResponse

type DataListResponse struct {
	Count     int             `json:"count"`               // Count is the number of items in the list.
	Documents []DataViewModel `json:"documents,omitempty"` // Documents is an array of the returned view models
}

type DataViewModel

type DataViewModel struct {
	SampleData
	Confidence float64 `json:"confidence"`
}

type DocumentCountResponse

type DocumentCountResponse struct {
	Count int `json:"count"`
}

type OpaWeightsResponse

type OpaWeightsResponse struct {
	Weights map[string]int `json:"result,omitempty"`
}

func (*OpaWeightsResponse) UnmarshalJSON

func (p *OpaWeightsResponse) UnmarshalJSON(data []byte) error

type SampleData

type SampleData struct {
	Description string    `json:"description,omitempty"`
	Id          ulid.ULID `json:"id,omitempty"`
	Seed        string    `json:"seed,omitempty"`
	Signature   string    `json:"signature,omitempty"`
	Timestamp   string    `json:"timestamp,omitempty"`
}

SampleData represents the data at play in the application's data path. We should not expect this type to have fields specific to the view model that includes data confidence. This type representation is also what is used to create the original hash, so we must map from view model to original data type. This further implies a shared library of "contract" data types available to the developer creating the view model, as well as the Alvarium SDK.

Jump to

Keyboard shortcuts

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