Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusBadRequest = 100 StatusInternalError = 101 )
Variables ¶
This section is empty.
Functions ¶
func SolveAnnotations ¶
func SolveAnnotations(solver func(*AnnotationSolverRequest) (*AnnotationSolverResponse, error))
SolveAnnotations solves annotations and writes the result to stdout and exits.
Types ¶
type Annotation ¶
type Annotation struct {
ID ID `json:"id"`
Object ID `json:"object"`
Params map[string]Parameter `json:"params"`
}
Annotation represents an annotation.
type AnnotationSolverRequest ¶
type AnnotationSolverRequest struct {
Objects map[ID]*Object `json:"objects"`
Annotations map[ID]*Annotation `json:"annotations"`
}
AnnotationSolverRequest represents a request to solve annotations.
type AnnotationSolverResponse ¶
type AnnotationSolverResponse struct {
Annotations map[ID]*Annotation `json:"annotations"`
}
AnnotationSolverResponse represents a response to solve annotations.
type Object ¶
type Object struct {
ID ID `json:"id"`
Name string `json:"name"`
Type ObjectType `json:"type"`
Pkg string `json:"pkg"`
File string `json:"file"`
}
Object represents an object which may be annotated.
type ObjectType ¶
type ObjectType = string
const ( ObjectFile ObjectType = "file" ObjectConstDecl ObjectType = "const.decl" ObjectConst ObjectType = "const" ObjectEnumDecl ObjectType = "enum.decl" ObjectEnum ObjectType = "enum" ObjectEnumMember ObjectType = "enum.member" ObjectStructDecl ObjectType = "struct.decl" ObjectStruct ObjectType = "struct" ObjectStructField ObjectType = "struct.field" ObjectInterfaceDecl ObjectType = "interface.decl" ObjectInterface ObjectType = "interface" ObjectInterfaceMethod ObjectType = "interface.method" )
Click to show internal directories.
Click to hide internal directories.