codegeneration

package
v0.7.50 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateReturnList added in v0.7.36

func CreateReturnList(returnString string) (returnElementList []string, err error)

CreateReturnList creates a list of return elements from a string

Parameters:

  • returnString: the string to create the list from

Returns:

  • the list of return elements
  • an error if the string is empty

func ProcessElementName

func ProcessElementName(fullName string, dependencies []string) (namePseudocode string, nameFormatted string, err error)

ProcessElementName processes an element name

Parameters:

  • fullName: the full name of the element
  • dependencies: the dependencies of the element

Returns:

  • the pseudocode name of the element
  • the formatted name of the element
  • an error if the name is empty

func RemoveEmptyLines

func RemoveEmptyLines(input string) string

RemoveEmptyLines removes empty lines from a string

Parameters:

  • input: the string to remove empty lines from

Returns:

  • the string with empty lines removed

func SplitByCapitalLetters

func SplitByCapitalLetters(s string) string

SplitByCapitalLetters splits a string by capital letters

Parameters:

  • s: the string to split

Returns:

  • the string with spaces inserted before capital letters

func StringToCodeGenerationType

func StringToCodeGenerationType(nodeTypeString string) (sharedtypes.CodeGenerationType, error)

StringToCodeGenerationType converts a string to a CodeGenerationType enum value.

Parameters:

  • nodeTypeString: the string to convert

Returns:

  • the CodeGenerationType value
  • an error if the string is invalid

Types

type AssemblyMember added in v0.7.25

type AssemblyMember struct {
	Name       string                       `xml:"name,attr" json:"name"`
	Summary    string                       `xml:"summary" json:"summary"`
	ReturnType string                       `xml:"returnType" json:"return_type"`
	Returns    string                       `xml:"returns,omitempty" json:"returns"`
	Params     []sharedtypes.XMLMemberParam `xml:"param" json:"parameters"`          // Handles multiple <param> elements
	Example    sharedtypes.XMLMemberExample `xml:"example,omitempty" json:"example"` // Optional <example> element
	Remarks    string                       `xml:"remarks,omitempty" json:"remarks"` // Optional <remarks> element
	EnumValues string                       `xml:"enumValues,omitempty" json:"enum_values"`
}

type CodeGenerationPseudocodeResponse

type CodeGenerationPseudocodeResponse struct {
	Signature   string `json:"signature"`
	Description string `json:"description"`
}

type GraphDatabaseElement

type GraphDatabaseElement struct {
	Guid           string                       `json:"guid"`
	Type           string                       `json:"type"`
	NamePseudocode string                       `json:"name_pseudocode"`
	Description    string                       `json:"description"`
	Summary        string                       `json:"summary"`
	Examples       string                       `json:"examples"`
	Parameters     []sharedtypes.XMLMemberParam `json:"parameters"`
	Dependencies   []string                     `json:"dependencies"`
	ReturnType     string                       `json:"returnType"`
	Remarks        string                       `json:"remarks"`
}

type VectorDatabaseElement

type VectorDatabaseElement struct {
	Guid           string           `json:"guid"`
	DenseVector    []float32        `json:"dense_vector"`
	SparseVector   map[uint]float32 `json:"sparse_vector"`
	Type           string           `json:"type"`
	Name           string           `json:"name"`
	NamePseudocode string           `json:"name_pseudocode"`
	NameFormatted  string           `json:"name_formatted"`
	ParentClass    string           `json:"parent_class"`
}

type VectorDatabaseExample

type VectorDatabaseExample struct {
	Guid                   string            `json:"guid"`
	DenseVector            []float32         `json:"dense_vector"`
	SparseVector           map[uint]float32  `json:"sparse_vector"`
	DocumentName           string            `json:"document_name"`
	Dependencies           []string          `json:"dependencies"`
	DependencyEquivalences map[string]string `json:"dependency_equivalences"`
	Text                   string            `json:"text"`
	PreviousChunk          string            `json:"previous_chunk"`
	NextChunk              string            `json:"next_chunk"`
}

type VectorDatabaseUserGuideSection

type VectorDatabaseUserGuideSection struct {
	Guid              string `json:"guid"`
	SectionName       string `json:"section_name"`
	DocumentName      string `json:"document_name"`
	Title             string
	ParentSectionName string           `json:"parent_section_name"`
	Text              string           `json:"text"`
	Level             int              `json:"level"`
	PreviousChunk     string           `json:"previous_chunk"`
	NextChunk         string           `json:"next_chunk"`
	DenseVector       []float32        `json:"dense_vector"`
	SparseVector      map[uint]float32 `json:"sparse_vector"`
}

type XMLAssembly

type XMLAssembly struct {
	Name string `xml:"name"`
}

type XMLObjectDefinitionDocument

type XMLObjectDefinitionDocument struct {
	XMLName  xml.Name         `xml:"doc"`
	Assembly XMLAssembly      `xml:"assembly"`
	Members  []AssemblyMember `xml:"members>member"`
}

Structs representing the XML structure

Jump to

Keyboard shortcuts

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