api

package
v0.0.0-...-f6ca644 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSubAttributes

func ParseSubAttributes(i, o Attributes, key *string)

ParseSubAttributes function

Types

type Attributes

type Attributes map[string]interface{}

Attributes type map

func NewAttributes

func NewAttributes(i interface{}) (*Attributes, error)

NewAttributes function

func (*Attributes) Delete

func (a *Attributes) Delete(key string) error

Delete method

func (*Attributes) Get

func (a *Attributes) Get(key string) interface{}

Get method

func (*Attributes) GetArrayFloat32

func (a *Attributes) GetArrayFloat32(key string) (values []float32)

GetArrayFloat32 method

func (*Attributes) GetArrayFloat64

func (a *Attributes) GetArrayFloat64(key string) (values []float64)

GetArrayFloat64 method

func (*Attributes) GetArrayInt

func (a *Attributes) GetArrayInt(key string) (values []int)

GetArrayInt method

func (*Attributes) GetArrayInterface

func (a *Attributes) GetArrayInterface(key string) []interface{}

GetArrayInterface method

func (*Attributes) GetArrayString

func (a *Attributes) GetArrayString(key string) (values []string)

GetArrayString method

func (*Attributes) GetFloat64

func (a *Attributes) GetFloat64(key string) float64

GetFloat64 method

func (*Attributes) GetInt

func (a *Attributes) GetInt(key string) int

GetInt method

func (*Attributes) GetString

func (a *Attributes) GetString(key string) string

GetString method

func (*Attributes) GetSubAttributes

func (a *Attributes) GetSubAttributes(key string) (*Attributes, error)

GetSubAttributes method

func (Attributes) KeyExists

func (a Attributes) KeyExists(key string) bool

KeyExists method

func (*Attributes) PairKeyTo

func (a *Attributes) PairKeyTo(key string, o interface{}) error

PairKeyTo method

func (*Attributes) PairTo

func (a *Attributes) PairTo(o interface{}) error

PairTo method

func (Attributes) ParseKeyValSetAttributes

func (a Attributes) ParseKeyValSetAttributes() Attributes

ParseKeyValSetAttributes method

func (*Attributes) Set

func (a *Attributes) Set(key string, val interface{}) error

Set method

type Error

type Error struct {
	Code           string      `json:"code" bson:"code" binding:"required"`
	Type           string      `json:"type,omitempty" bson:"type,omitempty"`
	Status         string      `json:"status,omitempty" bson:"status,omitempty"`
	Message        string      `json:"message,omitempty" bson:"message,omitempty"`
	MessageDetails string      `json:"message_details,omitempty" bson:"message_details,omitempty"`
	Refs           interface{} `json:"refs,omitempty" bson:"refs,omitempty"`
}

Error struct

type Filter

type Filter struct {
	Key   string `json:"key" bson:"key"`
	Value string `json:"value" bson:"value"`
}

Filter struct

type IError

type IError struct {
	Result  string `json:"result" bson:"result"  binding:"required"`
	Message string `json:"message,omitempty" bson:"message,omitempty"`
}

IError struct

type Limit

type Limit struct {
	Rows   int `json:"rows" bson:"rows"`
	Offset int `json:"offset" bson:"offset"`
}

Limit struct

type Params

type Params struct {
	Filters     []Filter `json:"filter" bson:"filter"`
	Sort        []Sort   `json:"sort" bson:"sort"`
	Limits      Limit    `json:"limit" bson:"limit"`
	AttrFilters []Filter `json:"filter_attributes" bson:"filter_attributes"`
}

Params struct

type Request

type Request struct {
	Kind   string      `json:"kind" bson:"kind" binding:"required"`
	Values interface{} `json:"values" bson:"values" binding:"required"`
}

Request struct

func ParseRequest

func ParseRequest(c *gin.Context) (*Request, error)

ParseRequest function

type Response

type Response struct {
	ReturnVal bool        `json:"returnval" bson:"returnval" binding:"required"`
	RespVal   string      `json:"respval,omitempty" bson:"respval,omitempty"`
	Kind      string      `json:"kind,omitempty" bson:"kind,omitempty"`
	Values    interface{} `json:"values,omitempty" bson:"values,omitempty"`
	Error     interface{} `json:"error,omitempty" bson:"error,omitempty"`
}

Response struct

type Sort

type Sort struct {
	Key   string `json:"key" bson:"key"`
	Value string `json:"value" bson:"value"`
}

Sort struct

Jump to

Keyboard shortcuts

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