versioning

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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