corenode

package
v1.2.2-0...-301a9f9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldMetadata

type FieldMetadata struct {
	Type        string `json:"datatype,omitempty"`
	IsComposite bool   `json:"isComposite,omitempty"`
}

type GrpcClient

type GrpcClient struct {
	SourceNodeName string `json:"sourceNodeName"`
	SourceNodeID   string `json:"sourceNodeId"`
	Port           string `json:"port"`
	// the below given, two keys are populated in language node and are used to create server's clients.
	Resources        []*Resource `json:"resources"`
	ProtoFileContent string      `json:"protoFileContent,omitempty"`
}

type GrpcConfig

type GrpcConfig struct {
	Template  string        `json:"template"`
	Framework string        `json:"framework"`
	Server    *GrpcServer   `json:"server"`
	Clients   []*GrpcClient `json:"clients"`
}

type GrpcServer

type GrpcServer struct {
	Port      string      `json:"port"`
	SQLDB     string      `json:"sqlDB"`
	NoSQLDB   string      `json:"noSQLDB"`
	Resources []*Resource `json:"resources"`
	// ProtoFileContent holds protoFileContent
	ProtoFileContent string `json:"protoFileContent,omitempty"`
}

type Node

type Node struct {
	ID string `json:"id"`
	// Language node's(component) language.
	Language string `json:"language"`
	// Name of a component (required, this will be service and deployment name).
	Name string `json:"name"`
	// RestConfig holds all config related to REST. If nil, it means that the node is not REST server or has REST clients.
	RestConfig *RestConfig `json:"restConfig,omitempty"`
	// GrpcConfig holds all config related to gRPC. If nil, it means that the node is not gRPC server or has gRPC clients.
	GrpcConfig *GrpcConfig `json:"grpcConfig,omitempty"`
	// WsConfig holds all config related to ws. If nil, it means that the node is not ws server or has WS clients.
	WsConfig *WsConfig `json:"wsConfig,omitempty"`
	// Metadata holds misc information about the node.
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// Annotations hold annotations for the node.
	Annotations map[string]string `json:"annotations,omitempty"`
}

Node depicts a separate repository

type Resource

type Resource struct {
	Name           string    `json:"name"`
	AllowedMethods []*string `json:"allowedMethods"`
	// resource fields (e.g., name, age in user)
	Fields map[string]FieldMetadata `json:"fields"`
}

Resource depicts the endpoints(e.g. /users, /accounts)

type RestClient

type RestClient struct {
	SourceNodeName string `json:"sourceNodeName"`
	SourceNodeID   string `json:"sourceNodeId"`
	Port           string `json:"port"`
	// The below given, two keys are populated in language node and are used to create server's clients.
	Resources              []*Resource `json:"resources"`
	OpenAPIFileYamlContent string      `json:"openAPIFileYamlContent,omitempty"`
}

type RestConfig

type RestConfig struct {
	Template  string        `json:"template"`
	Framework string        `json:"framework"`
	Server    *RestServer   `json:"server"`
	Clients   []*RestClient `json:"clients"`
}

type RestServer

type RestServer struct {
	Port      string      `json:"port"`
	SQLDB     string      `json:"sqlDB"`
	NoSQLDB   string      `json:"noSQLDB"`
	Resources []*Resource `json:"resources"`
	// OpenAPIFileYamlContent holds openAPIFileYamlContent
	OpenAPIFileYamlContent string `json:"openAPIFileYamlContent,omitempty"`
}

type WsClient

type WsClient struct {
	SourceNodeName string `json:"sourceNodeName"`
	SourceNodeID   string `json:"sourceNodeId"`
	Port           string `json:"port"`
	// the below given, two keys are populated in language node and are used to create server's clients.
	Resources []Resource `json:"resources"`
}

type WsConfig

type WsConfig struct {
	Template  string      `json:"template"`
	Framework string      `json:"framework"`
	Server    *WsServer   `json:"server"`
	Clients   []*WsClient `json:"clients"`
}

type WsServer

type WsServer struct {
	Port      string     `json:"port"`
	Resources []Resource `json:"resources"`
}

Jump to

Keyboard shortcuts

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