sdkdocs

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sdkdocs defines a Docs provider which can be used to interact with structured documentation generated by Nobl9 SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docs

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

func New

func New() (*Docs, error)

func (Docs) GetDeprecatedPaths

func (s Docs) GetDeprecatedPaths(kind manifest.Kind) []string

GetDeprecatedPaths returns a list of deprecated paths for the given kind.

func (Docs) GetProperty

func (s Docs) GetProperty(kind manifest.Kind, path string) *PropertyDoc

GetProperty returns a PropertyDoc matching provided kind and path. If the property was not found it returns nil.

type ObjectDoc

type ObjectDoc struct {
	Kind       manifest.Kind    `yaml:"kind"`
	Version    manifest.Version `yaml:"version"`
	Properties []PropertyDoc    `yaml:"properties"`
	Examples   []string         `yaml:"examples,omitempty"`
}

type PropertyDoc

type PropertyDoc struct {
	Path          string     `json:"path"`
	Type          string     `json:"type"`
	Package       string     `json:"package,omitempty"`
	Doc           string     `yaml:"doc,omitempty"`
	IsDeprecated  bool       `json:"isDeprecated,omitempty"`
	IsOptional    bool       `json:"isOptional,omitempty"`
	IsSecret      bool       `json:"isSecret,omitempty"`
	Examples      []string   `json:"examples,omitempty"`
	Values        []string   `json:"values,omitempty"`
	Rules         []RulePlan `json:"rules,omitempty"`
	ChildrenPaths []string   `json:"childrenPaths,omitempty"`
}

type RulePlan

type RulePlan struct {
	Description string   `json:"description"`
	Details     string   `json:"details,omitempty"`
	ErrorCode   string   `json:"errorCode,omitempty"`
	Conditions  []string `json:"conditions,omitempty"`
}

Jump to

Keyboard shortcuts

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