Skip to content

Prypiatos/shared-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

shared-models

Shared payload models for use across services and tooling.


Usage

Add the module

go get github.com/Prypiatos/shared-models@v1.0.0

Import in code

import "github.com/Prypiatos/shared-models/models"

Updating the dependency

Upgrade to a newer version:

go get github.com/Prypiatos/shared-models@v1.1.0
go mod tidy

Breaking Changes (v2+)

For major version upgrades (v2 and above), the module path includes the version suffix.

Install v2+

go get github.com/Prypiatos/shared-models/v2@v2.0.0

Import path

import "github.com/Prypiatos/shared-models/v2/models"

Notes

  • The /v2 suffix applies to all v2 versions (v2.0.0, v2.1.0, etc.)
  • Minor and patch updates within v2 do not change the import path

Versioning

This module follows Semantic Versioning:

vMAJOR.MINOR.PATCH
  • PATCH: bug fixes, no API changes
  • MINOR: backward-compatible additions (e.g., new payloads, new fields)
  • MAJOR: breaking changes (e.g., field removals, renames, type changes)

Compatibility Guarantees

Within a given major version (e.g., all v1.x.x releases):

  • Existing struct fields will not be removed or renamed
  • Existing field types will not be changed
  • New fields may be added, so consumers should not use full struct equality checks
  • JSON field names (tags) will not change

Breaking Changes (new major version)

A new major version (e.g., v2) may introduce:

  • Field removals or renames
  • Type changes
  • Structural changes to payloads

These require:

  • Updating the module path (/v2)
  • Updating import paths in consuming code

For Contributors

Releasing a new version

  1. Make changes
  2. Commit
  3. Tag the version:
git tag v1.1.0
git push origin v1.1.0

Releasing v2+

  1. Update go.mod:
module github.com/Prypiatos/shared-models/v2
  1. Commit and tag:
git tag v2.0.0
git push origin v2.0.0

About

Shared payload models for use across services and tooling

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages