Documentation ¶
Index ¶
- type GithubContent
- type GithubFile
- type Image
- type Kustomize
- type License
- type Lifeycle
- type MManager
- func (m *MManager) AddCA(name string, newCA util.CAType) error
- func (m *MManager) AddCert(name string, newCert util.CertType) error
- func (m *MManager) CachedState() (State, error)
- func (m *MManager) CommitState() error
- func (m *MManager) ReloadFile() error
- func (m *MManager) RemoveStateFile() error
- func (m *MManager) ResetLifecycle() error
- func (m *MManager) Save(v State) error
- func (m *MManager) SaveKustomize(kustomize *Kustomize) error
- func (m *MManager) SerializeAppMetadata(metadata api.ReleaseMetadata) error
- func (m *MManager) SerializeConfig(assets []api.Asset, meta api.ReleaseMetadata, ...) error
- func (m *MManager) SerializeContentSHA(contentSHA string) error
- func (m *MManager) SerializeHelmValues(values string, defaults string) error
- func (m *MManager) SerializeNamespace(namespace string) error
- func (m *MManager) SerializeReleaseName(name string) error
- func (m *MManager) SerializeShipMetadata(metadata api.ShipAppMetadata, applicationType string) error
- func (m *MManager) SerializeUpstream(upstream string) error
- func (m *MManager) SerializeUpstreamContents(contents *UpstreamContents) error
- func (m *MManager) StateUpdate(updater Update) (State, error)
- func (m *MManager) UpdateVersion()
- type Manager
- type Metadata
- type Overlay
- type ShipRelease
- type State
- func (v State) CurrentCAs() map[string]util.CAType
- func (v State) CurrentCerts() map[string]util.CertType
- func (v State) CurrentConfig() (map[string]interface{}, error)
- func (v State) CurrentHelmValues() string
- func (v State) CurrentHelmValuesDefaults() string
- func (v State) CurrentKustomize() *Kustomize
- func (v State) CurrentKustomizeOverlay(filename string) (contents string, isResource bool)
- func (v State) CurrentNamespace() string
- func (v State) CurrentReleaseName() string
- func (v State) IsEmpty() bool
- func (v State) ReleaseMetadata() *api.ReleaseMetadata
- func (v State) Upstream() string
- func (v State) UpstreamContents() *UpstreamContents
- func (v State) Versioned() State
- func (v State) WithCompletedStep(step api.Step) State
- type StepsCompleted
- type Terraform
- type Update
- type UpstreamContents
- type UpstreamFile
- type V1
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubContent ¶ added in v0.47.0
type GithubContent struct { Repo string `json:"repo"` Path string `json:"path"` Ref string `json:"ref"` Files []GithubFile `json:"files"` }
type GithubFile ¶ added in v0.47.0
type Kustomize ¶
type License ¶ added in v0.47.0
type License struct { ID string `json:"id" yaml:"id" hcl:"id"` Assignee string `json:"assignee" yaml:"assignee" hcl:"assignee"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt" hcl:"createdAt"` ExpiresAt time.Time `json:"expiresAt" yaml:"expiresAt" hcl:"expiresAt"` Type string `json:"type" yaml:"type" hcl:"type"` }
type Lifeycle ¶
type Lifeycle struct {
StepsCompleted StepsCompleted `json:"stepsCompleted,omitempty" yaml:"stepsCompleted,omitempty" hcl:"stepsCompleted,omitempty"`
}
type MManager ¶
type MManager struct { Logger log.Logger FS afero.Afero V *viper.Viper StateRWMut sync.RWMutex // contains filtered or unexported fields }
MManager is the saved output of a plan run to load on future runs
func (*MManager) CachedState ¶ added in v0.48.0
CachedState will return currently chached state.
func (*MManager) CommitState ¶ added in v0.48.0
func (*MManager) ReloadFile ¶ added in v0.48.0
func (*MManager) RemoveStateFile ¶
RemoveStateFile will attempt to remove the state file from disk
func (*MManager) ResetLifecycle ¶ added in v0.16.0
ResetLifecycle is used by `ship update --headed` to reset the saved stepsCompleted in the state.json
func (*MManager) SaveKustomize ¶
func (*MManager) SerializeAppMetadata ¶ added in v0.16.0
func (m *MManager) SerializeAppMetadata(metadata api.ReleaseMetadata) error
SerializeAppMetadata is used by `ship app` to serialize replicated app metadata to state file
func (*MManager) SerializeConfig ¶
func (m *MManager) SerializeConfig(assets []api.Asset, meta api.ReleaseMetadata, templateContext map[string]interface{}) error
SerializeConfig takes the application data and input params and serializes a state file to disk
func (*MManager) SerializeContentSHA ¶
SerializeContentSHA writes the contentSHA to the state file
func (*MManager) SerializeHelmValues ¶
SerializeHelmValues takes user input helm values and serializes a state file to disk
func (*MManager) SerializeNamespace ¶ added in v0.30.0
SerializeNamespace serializes to disk the namespace to use for helm template
func (*MManager) SerializeReleaseName ¶ added in v0.20.0
SerializeReleaseName serializes to disk the name to use for helm template
func (*MManager) SerializeShipMetadata ¶ added in v0.16.0
func (m *MManager) SerializeShipMetadata(metadata api.ShipAppMetadata, applicationType string) error
SerializeShipMetadata is used by `ship init` to serialize metadata from ship applications to state file
func (*MManager) SerializeUpstream ¶
SerializeUpstream is used by `ship init` to serialize a state file with ChartURL to disk
func (*MManager) SerializeUpstreamContents ¶ added in v0.47.0
func (m *MManager) SerializeUpstreamContents(contents *UpstreamContents) error
SerializeConfig takes the application data and input params and serializes a state file to disk
func (*MManager) StateUpdate ¶ added in v0.47.0
applies the provided updater to the current state. Returns the new state and err
func (*MManager) UpdateVersion ¶ added in v0.47.0
func (m *MManager) UpdateVersion()
type Manager ¶
type Manager interface { SerializeHelmValues(values string, defaults string) error SerializeReleaseName(name string) error SerializeNamespace(namespace string) error SerializeConfig( assets []api.Asset, meta api.ReleaseMetadata, templateContext map[string]interface{}, ) error CachedState() (State, error) CommitState() error ReloadFile() error StateUpdate(updater Update) (State, error) RemoveStateFile() error SaveKustomize(kustomize *Kustomize) error SerializeUpstream(URL string) error SerializeContentSHA(contentSHA string) error SerializeShipMetadata(api.ShipAppMetadata, string) error SerializeAppMetadata(api.ReleaseMetadata) error SerializeUpstreamContents(contents *UpstreamContents) error Save(v State) error ResetLifecycle() error UpdateVersion() AddCert(name string, newCert util.CertType) error AddCA(name string, newCA util.CAType) error }
func GetManager ¶ added in v0.48.0
GetManager will create and return a singleton state manager object. This should be used in everything that isn't a test.
func GetSingleton ¶ added in v0.48.0
func GetSingleton() Manager
type Metadata ¶ added in v0.17.1
type Metadata struct { ApplicationType string `json:"applicationType" yaml:"applicationType" hcl:"applicationType"` Sequence int64 `json:"sequence" yaml:"sequence" hcl:"sequence" meta:"sequence"` Icon string `json:"icon,omitempty" yaml:"icon,omitempty" hcl:"icon,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty" hcl:"name,omitempty"` ReleaseNotes string `json:"releaseNotes" yaml:"releaseNotes" hcl:"releaseNotes"` Version string `json:"version" yaml:"version" hcl:"version"` CustomerID string `json:"customerID,omitempty" yaml:"customerID,omitempty" hcl:"customerID,omitempty"` InstallationID string `json:"installationID,omitempty" yaml:"installationID,omitempty" hcl:"installationID,omitempty"` LicenseID string `json:"licenseID,omitempty" yaml:"licenseID,omitempty" hcl:"licenseID,omitempty"` AppSlug string `json:"appSlug,omitempty" yaml:"appSlug,omitempty" hcl:"appSlug,omitempty"` License License `json:"license" yaml:"license" hcl:"license"` }
type Overlay ¶
type Overlay struct { ExcludedBases []string `json:"excludedBases,omitempty" yaml:"excludedBases,omitempty" hcl:"excludedBases,omitempty"` Patches map[string]string `json:"patches,omitempty" yaml:"patches,omitempty" hcl:"patches,omitempty"` Resources map[string]string `json:"resources,omitempty" yaml:"resources,omitempty" hcl:"resources,omitempty"` }
func NewOverlay ¶ added in v0.17.0
func NewOverlay() Overlay
type ShipRelease ¶ added in v0.47.0
type ShipRelease struct { ID string `json:"id"` Sequence int64 `json:"sequence"` ChannelID string `json:"channelId"` ChannelName string `json:"channelName"` ChannelIcon string `json:"channelIcon"` Semver string `json:"semver"` ReleaseNotes string `json:"releaseNotes"` Spec string `json:"spec"` Images []Image `json:"images"` GithubContents []GithubContent `json:"githubContents"` Created string `json:"created"` // TODO: this time is not in RFC 3339 format RegistrySecret string `json:"registrySecret,omitempty"` EntitlementSpec string `json:"entitlementSpec,omitempty"` Entitlements api.Entitlements `json:"entitlements,omitempty"` ConfigSpec string `json:"configSpec,omitempty"` CollectSpec string `json:"collectSpec,omitempty"` AnalyzeSpec string `json:"analyzeSpec,omitempty"` }
ShipRelease is the release response from GQL
func (*ShipRelease) ToReleaseMeta ¶ added in v0.47.0
func (r *ShipRelease) ToReleaseMeta() api.ReleaseMetadata
ToReleaseMeta linter
type State ¶
type State struct {
V1 *V1 `json:"v1,omitempty" yaml:"v1,omitempty" hcl:"v1,omitempty"`
}
func (State) CurrentConfig ¶
func (State) CurrentHelmValues ¶
func (State) CurrentHelmValuesDefaults ¶
func (State) CurrentKustomize ¶
func (State) CurrentKustomizeOverlay ¶
func (State) CurrentNamespace ¶ added in v0.30.0
func (State) CurrentReleaseName ¶ added in v0.20.0
func (State) ReleaseMetadata ¶ added in v0.47.0
func (v State) ReleaseMetadata() *api.ReleaseMetadata
func (State) UpstreamContents ¶ added in v0.47.0
func (v State) UpstreamContents() *UpstreamContents
type StepsCompleted ¶
type StepsCompleted map[string]interface{}
func (StepsCompleted) String ¶
func (s StepsCompleted) String() string
type UpstreamContents ¶ added in v0.47.0
type UpstreamContents struct { UpstreamFiles []UpstreamFile `json:"upstreamFiles,omitempty" yaml:"upstreamFiles,omitempty" hcl:"upstreamFiles,omitempty"` AppRelease *ShipRelease `json:"appRelease,omitempty" yaml:"appRelease,omitempty" hcl:"appRelease,omitempty"` }
type UpstreamFile ¶ added in v0.47.0
type V1 ¶
type V1 struct { Config map[string]interface{} `json:"config" yaml:"config" hcl:"config"` Terraform *Terraform `json:"terraform,omitempty" yaml:"terraform,omitempty" hcl:"terraform,omitempty"` HelmValues string `json:"helmValues,omitempty" yaml:"helmValues,omitempty" hcl:"helmValues,omitempty"` ReleaseName string `json:"releaseName,omitempty" yaml:"releaseName,omitempty" hcl:"releaseName,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty" hcl:"namespace,omitempty"` HelmValuesDefaults string `json:"helmValuesDefaults,omitempty" yaml:"helmValuesDefaults,omitempty" hcl:"helmValuesDefaults,omitempty"` Kustomize *Kustomize `json:"kustomize,omitempty" yaml:"kustomize,omitempty" hcl:"kustomize,omitempty"` Upstream string `json:"upstream,omitempty" yaml:"upstream,omitempty" hcl:"upstream,omitempty"` Metadata *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" hcl:"metadata,omitempty"` UpstreamContents *UpstreamContents `json:"upstreamContents,omitempty" yaml:"upstreamContents,omitempty" hcl:"upstreamContents,omitempty"` ShipVersion *version.Build `json:"shipVersion,omitempty" yaml:"shipVersion,omitempty" hcl:"shipVersion,omitempty"` //deprecated in favor of upstream ChartURL string `json:"chartURL,omitempty" yaml:"chartURL,omitempty" hcl:"chartURL,omitempty"` ChartRepoURL string `json:"ChartRepoURL,omitempty" yaml:"ChartRepoURL,omitempty" hcl:"ChartRepoURL,omitempty"` ChartVersion string `json:"ChartVersion,omitempty" yaml:"ChartVersion,omitempty" hcl:"ChartVersion,omitempty"` ContentSHA string `json:"contentSHA,omitempty" yaml:"contentSHA,omitempty" hcl:"contentSHA,omitempty"` Lifecycle *Lifeycle `json:"lifecycle,omitempty" yaml:"lifecycle,omitempty" hcl:"lifecycle,omitempty"` CAs map[string]util.CAType `json:"cas,omitempty" yaml:"cas,omitempty" hcl:"cas,omitempty"` Certs map[string]util.CertType `json:"certs,omitempty" yaml:"certs,omitempty" hcl:"certs,omitempty"` }