Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrVersionNotFound is returned when a version is not found ErrVersionNotFound = errors.New("version not found") // ErrVersionExists is returned when a version already exists ErrVersionExists = errors.New("version already exists") )
Functions ¶
This section is empty.
Types ¶
type Changelog ¶
type Changelog struct {
Versions []*VersionEntry `json:"versions"`
}
Changelog represents the entire CHANGELOG.md file
type ChangelogContent ¶
type ChangelogContent struct {
Added []string `json:"added,omitempty"`
Changed []string `json:"changed,omitempty"`
Deprecated []string `json:"deprecated,omitempty"`
Removed []string `json:"removed,omitempty"`
Fixed []string `json:"fixed,omitempty"`
Security []string `json:"security,omitempty"`
}
ChangelogContent represents the content of a changelog entry
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides changelog operations
func NewService ¶
NewService creates a new changelog service
func (*Service) AddEntry ¶
func (s *Service) AddEntry(version string, date string, content *ChangelogContent) error
AddEntry adds a new changelog entry
func (*Service) GetByVersion ¶
func (s *Service) GetByVersion(version string) (*VersionEntry, error)
GetByVersion retrieves a specific version entry
func (*Service) UpdateEntry ¶
func (s *Service) UpdateEntry(version string, date string, content *ChangelogContent) error
UpdateEntry updates an existing changelog entry
type VersionEntry ¶
type VersionEntry struct {
Version string `json:"version"`
Date string `json:"date"`
Content *ChangelogContent `json:"content"`
}
VersionEntry represents a version entry in the changelog
Click to show internal directories.
Click to hide internal directories.