Documentation
¶
Overview ¶
Package versioning provides protocol version management and changelog generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateChangelog ¶
func GenerateChangelog(bumps []*VersionBump) string
GenerateChangelog generates a changelog from version bumps.
Types ¶
type Change ¶
type Change struct {
Type ChangeType `json:"type"`
Field string `json:"field"`
Description string `json:"description"`
}
Change represents a single protocol change.
type ChangeType ¶
type ChangeType int
ChangeType represents the type of protocol change.
const ( FieldAdded ChangeType = iota // minor FieldRemoved // major FieldChanged // major MetaChanged // patch )
type VersionBump ¶
type VersionBump struct {
Current string `json:"current"`
Suggested string `json:"suggested"`
BumpType string `json:"bump_type"` // "major", "minor", "patch"
Changes []Change `json:"changes"`
Breaking bool `json:"breaking"`
}
VersionBump represents a semver bump recommendation.
func CompareSchemas ¶
func CompareSchemas(old, new *schema.ProtocolSchema) *VersionBump
CompareSchemas compares two protocol schemas and returns changes.
Click to show internal directories.
Click to hide internal directories.