languages

package
v0.0.0-...-0e43621 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Go = "go"
View Source
const Java = "java"
View Source
const JavaScript = "javascript"
View Source
const Python = "python"
View Source
const Ruby = "ruby"
View Source
const Rust = "rust"
View Source
const TypeScript = "typescript"

Variables

View Source
var (
	ContextKeyLanguageContextVars = contextKey("LanguageContextVars")
)

Functions

func AddValuesToContext

func AddValuesToContext(ctx context.Context, project *core.Project, languageNode *LanguageNode) context.Context

func GetOpenAPIFileYamlContentAndFrameworkAndTemplateFromNodeForEdge

func GetOpenAPIFileYamlContentAndFrameworkAndTemplateFromNodeForEdge(src string, nodes []*corenode.Node) (string, string, string)

func PopulateClientsForNode

func PopulateClientsForNode(compageJSON *core.CompageJSON, nodeP *corenode.Node) error

PopulateClientsForNode retrieves all clients for given node

func ProcessOpenAPITemplate

func ProcessOpenAPITemplate(ctx context.Context) error

Types

type LanguageNode

type LanguageNode struct {
	ID          string                 `json:"ID"`
	Name        string                 `json:"name"`
	NodeType    string                 `json:"nodeType"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
	Annotations map[string]string      `json:"annotations,omitempty"`
	Language    string                 `json:"language"`

	RestConfig *corenode.RestConfig `json:"addRestConfig"`
	GrpcConfig *corenode.GrpcConfig `json:"grpcConfig"`
	WsConfig   *corenode.WsConfig   `json:"wsConfig"`
}

func NewLanguageNode

func NewLanguageNode(compageJSON *core.CompageJSON, node *corenode.Node) (*LanguageNode, error)

NewLanguageNode converts node to LanguageNode struct

type TemplateVarKey

type TemplateVarKey string
const (
	GitRepositoryName   TemplateVarKey = "GitRepositoryName"
	GitPlatformName     TemplateVarKey = "GitPlatformName"
	GitPlatformURL      TemplateVarKey = "GitPlatformURL"
	GitPlatformUserName TemplateVarKey = "GitPlatformUserName"
	NodeName            TemplateVarKey = "NodeName"
)

type Values

type Values struct {
	TemplateVars      map[TemplateVarKey]string
	ProjectName       string
	NodeDirectoryName string
	LanguageNode      *LanguageNode
}

func (Values) Get

func (v Values) Get(key TemplateVarKey) string

Jump to

Keyboard shortcuts

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