qdrant

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Funcs provides methods for converting a golang struct to a map[string]interface{} and vice versa using JSON tags Therefore the name: stm -> *S*truct *T*o *M*ap

Index

Constants

View Source
const (

	// Parameters
	InvalidParametersError = "invalid parameters"
	DecodeFailedError      = "could not decode parameters"

	// Config
	AddingConfigFailedError  = "adding config failed"
	ReadingConfigFailedError = "reading config failed"
	ConfigNotFoundError      = "config not found"
	DeleteConfigFailedError  = "deleting config failed"
	ListConfigFailedError    = "listing config failed"

	// Role
	AddingRoleFailedError  = "adding role failed"
	ReadingRoleFailedError = "reading role failed"
	RoleNotFoundError      = "role not found"
	DeleteRoleFailedError  = "deleting role failed"
	ListRoleFailedError    = "listing role failed"

	ReadingJWTFailedError = "reading JWT failed"
)
View Source
const (
	SYS_ROLE_TABLE = "sys_roles"
)

Variables

This section is empty.

Functions

func BuildErrResponse

func BuildErrResponse(code string, err error) string

func Factory

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

func MapToStruct

func MapToStruct[T any](in map[string]interface{}, out *T) error

func StructToMap

func StructToMap[T any](in *T, out *map[string]interface{}) error

Types

type ConfigParameters

type ConfigParameters struct {
	DBId               string                  `json:"dbId"`
	URL                string                  `json:"url"`
	SignKey            string                  `json:"sig_Key"`
	SignatureAlgorithm jose.SignatureAlgorithm `json:"sig_alg,omitempty"`
	TokenTTL           string                  `json:"jwt_ttl,omitempty"`
	TLS                bool                    `json:"tls,omitempty"`
	CA                 string                  `json:"ca,omitempty"`
}

type JWTParameters

type JWTParameters struct {
	DBId   string `json:"dbId"`
	RoleId string `json:"role"`
	Token  string `json:"token"`
}

type QdrantBackend

type QdrantBackend struct {
	*framework.Backend
	// contains filtered or unexported fields
}

QdrantBackend defines an object that extends the Vault backend and stores the target API's client.

type QdrantClient

type QdrantClient struct {
}

type RoleParameters

type RoleParameters struct {
	DBId     string                 `json:"dbId"`
	RoleId   string                 `json:"role"`
	TokenTTL string                 `json:"jwt_ttl,omitempty"`
	Claims   map[string]interface{} `json:"claims"`
}

Jump to

Keyboard shortcuts

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