Documentation
¶
Overview ¶
Package consignment provides functionality for managing consignments in Shipyard projects. A consignment represents a set of changes made to one or more packages and is used to track changes for release management.
Index ¶
- type ChangeType
- type Consignment
- type Manager
- func (m *Manager) ApplyConsignments() (map[string]*semver.Version, error)
- func (m *Manager) ApplyConsignmentsWithTemplate(templateName string) (map[string]*semver.Version, error)
- func (m *Manager) ApplyConsignmentsWithTemplateAndTags(templateName string, gitTags map[string]string) (map[string]*semver.Version, error)
- func (m *Manager) ApplyVersionUpdatesAndClearConsignments(versions map[string]*semver.Version) error
- func (m *Manager) CalculateAllVersions() (map[string]*semver.Version, error)
- func (m *Manager) CalculateNextVersion(pkgName string) (*semver.Version, error)
- func (m *Manager) ClearConsignments() error
- func (m *Manager) CreateConsignment(packages []string, changeType string, summary string) (*Consignment, error)
- func (m *Manager) EnsureConsignmentDir() error
- func (m *Manager) GetAvailableChangeTypes() []config.ChangeTypeConfig
- func (m *Manager) GetAvailablePackages() []config.Package
- func (m *Manager) GetChangeTypeConfig(changeTypeName string) *config.ChangeTypeConfig
- func (m *Manager) GetConsignmens() ([]*Consignment, error)
- func (m *Manager) GetConsignmentDir() string
- func (m *Manager) GetConsignmentsForPackage(pkgName string) ([]*Consignment, error)
- func (m *Manager) RecordShipmentHistoryOnly(templateName string) (map[string]*semver.Version, error)
- func (m *Manager) RecordShipmentHistoryWithTags(templateName string, gitTags map[string]string) (map[string]*semver.Version, error)
- func (m *Manager) UpdatePackageVersion(pkgName string, version *semver.Version) error
- func (m *Manager) ValidateChangeType(changeTypeName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consignment ¶
type Consignment struct {
ID string `json:"id"`
Packages map[string]string `json:"packages"` // package name -> change type
Summary string `json:"summary"`
Created time.Time `json:"created"`
}
Consignment represents a set of changes made to packages
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles consignment operations
func NewManager ¶
func NewManager(projectConfig *config.ProjectConfig) *Manager
NewManager creates a new consignment manager
func NewManagerWithDir ¶
func NewManagerWithDir(projectConfig *config.ProjectConfig, dir string) *Manager
NewManagerWithDir creates a new consignment manager with a custom directory
func (*Manager) ApplyConsignments ¶
ApplyConsignments calculates and applies version updates to all packages, then clears consignments
func (*Manager) ApplyConsignmentsWithTemplate ¶
func (m *Manager) ApplyConsignmentsWithTemplate(templateName string) (map[string]*semver.Version, error)
ApplyConsignmentsWithTemplate calculates and applies version updates, records shipment history, then clears consignments
func (*Manager) ApplyConsignmentsWithTemplateAndTags ¶
func (m *Manager) ApplyConsignmentsWithTemplateAndTags(templateName string, gitTags map[string]string) (map[string]*semver.Version, error)
ApplyConsignmentsWithTemplateAndTags calculates and applies version updates, records shipment history with git tags, then clears consignments
func (*Manager) ApplyVersionUpdatesAndClearConsignments ¶
func (m *Manager) ApplyVersionUpdatesAndClearConsignments(versions map[string]*semver.Version) error
ApplyVersionUpdatesAndClearConsignments applies version updates and clears consignments
func (*Manager) CalculateAllVersions ¶
CalculateAllVersions calculates the next version for all packages in the project
func (*Manager) CalculateNextVersion ¶
CalculateNextVersion calculates the next version for a package based on its consignments
func (*Manager) ClearConsignments ¶
ClearConsignments removes all consignment files from the consignment directory
func (*Manager) CreateConsignment ¶
func (m *Manager) CreateConsignment(packages []string, changeType string, summary string) (*Consignment, error)
CreateConsignment creates a new consignment with the specified packages, change type, and summary
func (*Manager) EnsureConsignmentDir ¶
EnsureConsignmentDir creates the consignment directory if it doesn't exist
func (*Manager) GetAvailableChangeTypes ¶
func (m *Manager) GetAvailableChangeTypes() []config.ChangeTypeConfig
GetAvailableChangeTypes returns the available change types from the project configuration
func (*Manager) GetAvailablePackages ¶
GetAvailablePackages returns the list of available packages based on the project configuration
func (*Manager) GetChangeTypeConfig ¶
func (m *Manager) GetChangeTypeConfig(changeTypeName string) *config.ChangeTypeConfig
GetChangeTypeConfig returns the configuration for a specific change type
func (*Manager) GetConsignmens ¶
func (m *Manager) GetConsignmens() ([]*Consignment, error)
func (*Manager) GetConsignmentDir ¶
GetConsignmentDir returns the consignment directory path
func (*Manager) GetConsignmentsForPackage ¶
func (m *Manager) GetConsignmentsForPackage(pkgName string) ([]*Consignment, error)
func (*Manager) RecordShipmentHistoryOnly ¶
func (m *Manager) RecordShipmentHistoryOnly(templateName string) (map[string]*semver.Version, error)
RecordShipmentHistoryOnly records the shipment history without applying version updates or clearing consignments
func (*Manager) RecordShipmentHistoryWithTags ¶
func (m *Manager) RecordShipmentHistoryWithTags(templateName string, gitTags map[string]string) (map[string]*semver.Version, error)
RecordShipmentHistoryWithTags records the shipment history with git tags without applying version updates or clearing consignments
func (*Manager) UpdatePackageVersion ¶
UpdatePackageVersion updates the version of a package using its ecosystem handler
func (*Manager) ValidateChangeType ¶
ValidateChangeType validates if a change type is supported