# README
package spec
import ( "fmt" "strings" )
type Readme struct {
Selector struct {
Repository string yaml:"repository"
} yaml:"selector"
Title string yaml:"title,omitempty"
Abstract string yaml:"abstract,omitempty"
Topics []struct {
Heading string yaml:"heading"
Body string yaml:"body"
} yaml:"topics,omitempty"
}
func (s *Readme) String() string { sb := new(strings.Builder) if s.Title != "" { sb.WriteString(fmt.Sprintf("# %s\n\n", s.Title)) } if s.Abstract != "" { sb.WriteString(s.Abstract) sb.WriteString("\n\n") } for _, topic := range s.Topics { sb.WriteString(fmt.Sprintf("## %s\n\n", topic.Heading)) sb.WriteString(topic.Body) sb.WriteString("\n\n") } return sb.String() }
# Functions
NewModel with kind.
ReadFile models from file.
ReadStream of models from reader.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
KindHook - repository webhook.
KindOrg - organization model kind.
KindProtection - repository branch protection rule.
KindReadme - repository readme model kind.
KindRepo - repository model kind.
KindTeam - organization team.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Version of spec.
# Structs
ErrInvalidKind - error that kind is not the value as expected.
No description provided by the author
Metadata for spec.
Model of spec.
No description provided by the author
Protection rule of repositry branch.
No description provided by the author
Repo spec.
No description provided by the author
# Type aliases
Kind of specification.