service

package
v0.0.0-...-2798f75 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChangedResourceKey = "configured"
)

Variables

This section is empty.

Functions

func New

func New() *heartbeat

Types

type ApplicationWrapper

type ApplicationWrapper struct {
	Application argoSdk.ArgoApplication
	HistoryId   int64
}

type ArgoResourceService

type ArgoResourceService interface {
	IdentifyChangedResources(app argoSdk.ArgoApplication, resources []Resource, commit provider.ResourceCommit, historyId int64, updateAt string) []*Resource
	AdaptArgoProjects(projects []argoSdk.ProjectItem) []codefresh.AgentProject
	AdaptArgoApplications(applications []argoSdk.ApplicationItem) []codefresh.AgentApplication
	ResolveHistoryId(historyList []argoSdk.ApplicationHistoryItem, revision string, name string) (error, int64)
}

ArgoResourceService service for process argo resources

func NewArgoResourceService

func NewArgoResourceService() ArgoResourceService

NewArgoResourceService new instance of service

type ETransformer

type ETransformer interface {
	PrepareEnvironment(app argoSdk.ArgoApplication, historyId int64) (error, *EnvironmentWrapper)
}

This one should not exist and will be refactored soon, Env transformer should be migrated to service layer

func GetEnvTransformerInstance

func GetEnvTransformerInstance(argoApi argo.ArgoAPI) ETransformer

type EnvTransformer

type EnvTransformer struct {
	// contains filtered or unexported fields
}

func (*EnvTransformer) PrepareEnvironment

func (envTransformer *EnvTransformer) PrepareEnvironment(app argoSdk.ArgoApplication, historyId int64) (error, *EnvironmentWrapper)

type EnvironmentWrapper

type EnvironmentWrapper struct {
	Environment codefreshSdk.Environment
	Commit      provider.ResourceCommit
}

type Gitops

type Gitops interface {
	MarkEnvAsRemoved(obj interface{}) (error, *codefreshSdk.Environment)
	HandleNewApplications(applications []string) []*EnvironmentWrapper
	ExtractNewApplication(application string) (*EnvironmentWrapper, error)
}

func NewGitopsService

func NewGitopsService() Gitops

type Resource

type Resource struct {
	Status    string
	Name      string
	Commit    provider.ResourceCommit
	Kind      string
	UpdatedAt string
	HistoryId int64
}

type ResourcesWrapper

type ResourcesWrapper struct {
	ResourcesTree     []interface{}
	ManifestResources []*Resource
}

Jump to

Keyboard shortcuts

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