manifest

package module
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 11 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCurrentVersion

func IsCurrentVersion(version int) bool

func ValidateManifest

func ValidateManifest(content []byte) error

Types

type CollectionInfo

type CollectionInfo struct {
	Name          string                      `json:"-"`
	SearchMethods map[string]SearchMethodInfo `json:"searchMethods"`
}

type ConnectionInfo

type ConnectionInfo interface {
	ConnectionName() string
	ConnectionType() ConnectionType
	Hash() string
	Variables() []string
}

type ConnectionType

type ConnectionType string
const ConnectionTypeDgraph ConnectionType = "dgraph"
const ConnectionTypeHTTP ConnectionType = "http"
const ConnectionTypeMysql ConnectionType = "mysql"
const ConnectionTypeNeo4j ConnectionType = "neo4j"
const ConnectionTypePostgresql ConnectionType = "postgresql"

type DgraphConnectionInfo

type DgraphConnectionInfo struct {
	Name       string         `json:"-"`
	Type       ConnectionType `json:"type"`
	ConnStr    string         `json:"connString"`
	GrpcTarget string         `json:"grpcTarget"`
	Key        string         `json:"key"`
}

func (DgraphConnectionInfo) ConnectionName

func (info DgraphConnectionInfo) ConnectionName() string

func (DgraphConnectionInfo) ConnectionType

func (info DgraphConnectionInfo) ConnectionType() ConnectionType

func (DgraphConnectionInfo) Hash

func (info DgraphConnectionInfo) Hash() string

func (DgraphConnectionInfo) Variables

func (info DgraphConnectionInfo) Variables() []string

type EndpointAuthType

type EndpointAuthType string
const (
	EndpointAuthNone        EndpointAuthType = "none"
	EndpointAuthBearerToken EndpointAuthType = "bearer-token"
)

type EndpointInfo

type EndpointInfo interface {
	EndpointName() string
	EndpointType() EndpointType
	EndpointAuth() EndpointAuthType
}

type EndpointType

type EndpointType string
const (
	EndpointTypeGraphQL EndpointType = "graphql"
)

type GraphqlEndpointInfo

type GraphqlEndpointInfo struct {
	Name string           `json:"-"`
	Type EndpointType     `json:"type"`
	Path string           `json:"path"`
	Auth EndpointAuthType `json:"auth"`
}

func (GraphqlEndpointInfo) EndpointAuth

func (e GraphqlEndpointInfo) EndpointAuth() EndpointAuthType

func (GraphqlEndpointInfo) EndpointName

func (e GraphqlEndpointInfo) EndpointName() string

func (GraphqlEndpointInfo) EndpointType

func (e GraphqlEndpointInfo) EndpointType() EndpointType

type HTTPConnectionInfo

type HTTPConnectionInfo struct {
	Name            string            `json:"-"`
	Type            ConnectionType    `json:"type"`
	Endpoint        string            `json:"endpoint"`
	BaseURL         string            `json:"baseURL"`
	Headers         map[string]string `json:"headers"`
	QueryParameters map[string]string `json:"queryParameters"`
}

func (HTTPConnectionInfo) ConnectionName

func (info HTTPConnectionInfo) ConnectionName() string

func (HTTPConnectionInfo) ConnectionType

func (info HTTPConnectionInfo) ConnectionType() ConnectionType

func (HTTPConnectionInfo) Hash

func (info HTTPConnectionInfo) Hash() string

func (HTTPConnectionInfo) Variables

func (info HTTPConnectionInfo) Variables() []string

type IndexInfo

type IndexInfo struct {
	Type    string      `json:"type"`
	Options OptionsInfo `json:"options"`
}

type Manifest

type Manifest struct {
	Version     int                       `json:"-"`
	Endpoints   map[string]EndpointInfo   `json:"endpoints"`
	Models      map[string]ModelInfo      `json:"models"`
	Connections map[string]ConnectionInfo `json:"connections"`
	Collections map[string]CollectionInfo `json:"collections"`
}

func ReadManifest

func ReadManifest(content []byte) (*Manifest, error)

func (*Manifest) GetVariables

func (m *Manifest) GetVariables() map[string][]string

func (*Manifest) IsCurrentVersion

func (m *Manifest) IsCurrentVersion() bool

type ModelInfo

type ModelInfo struct {
	Name        string `json:"-"`
	SourceModel string `json:"sourceModel"`
	Provider    string `json:"provider"`
	Connection  string `json:"connection"`
	Path        string `json:"path"`
}

func (ModelInfo) Hash

func (m ModelInfo) Hash() string

type MysqlConnectionInfo added in v0.17.0

type MysqlConnectionInfo struct {
	Name    string         `json:"-"`
	Type    ConnectionType `json:"type"`
	ConnStr string         `json:"connString"`
}

func (MysqlConnectionInfo) ConnectionName added in v0.17.0

func (info MysqlConnectionInfo) ConnectionName() string

func (MysqlConnectionInfo) ConnectionType added in v0.17.0

func (info MysqlConnectionInfo) ConnectionType() ConnectionType

func (MysqlConnectionInfo) Hash added in v0.17.0

func (info MysqlConnectionInfo) Hash() string

func (MysqlConnectionInfo) Variables added in v0.17.0

func (info MysqlConnectionInfo) Variables() []string

type Neo4jConnectionInfo added in v0.15.0

type Neo4jConnectionInfo struct {
	Name     string         `json:"-"`
	Type     ConnectionType `json:"type"`
	DbUri    string         `json:"dbUri"`
	Username string         `json:"username"`
	Password string         `json:"password"`
}

func (Neo4jConnectionInfo) ConnectionName added in v0.15.0

func (info Neo4jConnectionInfo) ConnectionName() string

func (Neo4jConnectionInfo) ConnectionType added in v0.15.0

func (info Neo4jConnectionInfo) ConnectionType() ConnectionType

func (Neo4jConnectionInfo) Hash added in v0.15.0

func (info Neo4jConnectionInfo) Hash() string

func (Neo4jConnectionInfo) Variables added in v0.15.0

func (info Neo4jConnectionInfo) Variables() []string

type OptionsInfo

type OptionsInfo struct {
	EfConstruction int `json:"efConstruction"`
	MaxLevels      int `json:"maxLevels"`
}

type PostgresqlConnectionInfo

type PostgresqlConnectionInfo struct {
	Name    string         `json:"-"`
	Type    ConnectionType `json:"type"`
	ConnStr string         `json:"connString"`
}

func (PostgresqlConnectionInfo) ConnectionName

func (info PostgresqlConnectionInfo) ConnectionName() string

func (PostgresqlConnectionInfo) ConnectionType

func (info PostgresqlConnectionInfo) ConnectionType() ConnectionType

func (PostgresqlConnectionInfo) Hash

func (info PostgresqlConnectionInfo) Hash() string

func (PostgresqlConnectionInfo) Variables

func (info PostgresqlConnectionInfo) Variables() []string

type SearchMethodInfo

type SearchMethodInfo struct {
	Embedder string    `json:"embedder"`
	Index    IndexInfo `json:"index"`
}

Jump to

Keyboard shortcuts

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