cms

package
v2.935.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoComment

type AutoComment struct {
	Summary     string `yaml:"summary,omitempty"`
	Description string `yaml:"description,omitempty"`
}

func (*AutoComment) SetDescription

func (c *AutoComment) SetDescription(s string)

func (*AutoComment) SetSummary

func (c *AutoComment) SetSummary(s string)

func (*AutoComment) ToComment

func (c *AutoComment) ToComment() *Comment

type Comment

type Comment struct {
	Summary     string `yaml:"summary"`
	Description string `yaml:"description"`
}

func (*Comment) SetDescription

func (c *Comment) SetDescription(s string)

func (*Comment) SetSummary

func (c *Comment) SetSummary(s string)

type CommentSource

type CommentSource string
const (
	CSUser    CommentSource = ""
	CSSuggest CommentSource = "suggest"
	CSOpenAPI CommentSource = "openapi"
	CSBuiltIn CommentSource = "builtin"
)

type CommentTracker

type CommentTracker struct {
	// contains filtered or unexported fields
}

func New

func New(tags ...string) *CommentTracker

func (*CommentTracker) GetComment

func (c *CommentTracker) GetComment(fullName string) Comment

func (*CommentTracker) RegisterComment

func (c *CommentTracker) RegisterComment(source, namespace, name string, comment *ast.Comment) string

RegisterComment stores a comment under (namespace, name) for the given source. Empty comments are ignored; use ResolveComment when an empty registration should claim the slot.

func (*CommentTracker) ResolveComment

func (c *CommentTracker) ResolveComment(source, namespace, kind, name string, comment *ast.Comment) Comment

ResolveComment atomically registers a comment under (namespace, kind, name) for the given source and returns the merged comment for that key. An empty (or nil) comment claims the source slot, so the result reflects this registration — not another entity's — regardless of render-job order.

func (*CommentTracker) SetTags

func (c *CommentTracker) SetTags(tags ...string)

type SettableComment

type SettableComment interface {
	SetSummary(string)
	SetDescription(string)
}

type SourceComments

type SourceComments struct {
	Comment `yaml:",inline"`

	OpenAPI *AutoComment `yaml:"openapi,omitempty"`
	Builtin *AutoComment `yaml:"builtin,omitempty"`
	Suggest *AutoComment `yaml:"suggest,omitempty"`
}

Jump to

Keyboard shortcuts

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