Documentation
¶
Index ¶
- Constants
- type ApiService
- func (a *ApiService) FetchSnapshot(domainId string, environment string) (string, error)
- func (a *ApiService) FetchSnapshotVersion(domainId string, environment string) (string, error)
- func (c *ApiService) NewDataFromJson(jsonData []byte) model.Data
- func (a *ApiService) PushChanges(domainId string, diff model.DiffResult) (PushChangeResponse, error)
- type ComparatorService
- func (c *ComparatorService) CheckSnapshotDiff(left model.Snapshot, right model.Snapshot, diffType DiffType) model.DiffResult
- func (c *ComparatorService) MergeResults(diffResults []model.DiffResult) model.DiffResult
- func (c *ComparatorService) NewSnapshotFromJson(jsonData []byte) model.Snapshot
- func (c *ComparatorService) RemoveDeleted(diffResult model.DiffResult) model.DiffResult
- type CoreHandler
- type DiffResult
- type DiffType
- type GitService
- type GraphQLRequest
- type IAPIService
- type IComparatorService
- type IGitService
- type PushChangeResponse
Constants ¶
View Source
const ( NEW DiffType = "NEW" CHANGED DiffType = "CHANGED" DELETED DiffType = "DELETED" GROUP DiffResult = "GROUP" CONFIG DiffResult = "CONFIG" STRATEGY DiffResult = "STRATEGY" COMPONENT DiffResult = "COMPONENT" )
View Source
const ( CoreHandlerStatusCreated = -1 CoreHandlerStatusInit = 0 CoreHandlerStatusRunning = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService(apiKey string, apiUrl string, caCertPath string) *ApiService
func (*ApiService) FetchSnapshot ¶
func (a *ApiService) FetchSnapshot(domainId string, environment string) (string, error)
func (*ApiService) FetchSnapshotVersion ¶
func (a *ApiService) FetchSnapshotVersion(domainId string, environment string) (string, error)
func (*ApiService) NewDataFromJson ¶
func (c *ApiService) NewDataFromJson(jsonData []byte) model.Data
func (*ApiService) PushChanges ¶
func (a *ApiService) PushChanges(domainId string, diff model.DiffResult) (PushChangeResponse, error)
type ComparatorService ¶
type ComparatorService struct{}
func NewComparatorService ¶
func NewComparatorService() *ComparatorService
func (*ComparatorService) CheckSnapshotDiff ¶
func (c *ComparatorService) CheckSnapshotDiff(left model.Snapshot, right model.Snapshot, diffType DiffType) model.DiffResult
func (*ComparatorService) MergeResults ¶
func (c *ComparatorService) MergeResults(diffResults []model.DiffResult) model.DiffResult
func (*ComparatorService) NewSnapshotFromJson ¶
func (c *ComparatorService) NewSnapshotFromJson(jsonData []byte) model.Snapshot
func (*ComparatorService) RemoveDeleted ¶
func (c *ComparatorService) RemoveDeleted(diffResult model.DiffResult) model.DiffResult
type CoreHandler ¶
type CoreHandler struct { Status int // contains filtered or unexported fields }
func NewCoreHandler ¶
func NewCoreHandler(accountRepository repository.AccountRepository, apiService IAPIService, comparatorService IComparatorService) *CoreHandler
func (*CoreHandler) InitCoreHandlerGoroutine ¶
func (c *CoreHandler) InitCoreHandlerGoroutine() (int, error)
func (*CoreHandler) StartAccountHandler ¶
func (c *CoreHandler) StartAccountHandler(accountId string, gitService IGitService)
type DiffResult ¶
type DiffResult string
type GitService ¶
type GitService struct {
// contains filtered or unexported fields
}
func NewGitService ¶
func NewGitService(repoURL string, encryptedToken string, branchName string) *GitService
func (*GitService) GetRepositoryData ¶
func (g *GitService) GetRepositoryData(environment string) (*model.RepositoryData, error)
func (*GitService) PushChanges ¶
func (g *GitService) PushChanges(environment string, content string) (string, error)
func (*GitService) UpdateRepositorySettings ¶
func (g *GitService) UpdateRepositorySettings(repository string, encryptedToken string, branch string)
type GraphQLRequest ¶
type GraphQLRequest struct {
Query string `json:"query"`
}
type IAPIService ¶
type IComparatorService ¶
type IComparatorService interface { CheckSnapshotDiff(left model.Snapshot, right model.Snapshot, diffType DiffType) model.DiffResult MergeResults(diffResults []model.DiffResult) model.DiffResult NewSnapshotFromJson(jsonData []byte) model.Snapshot RemoveDeleted(diffResult model.DiffResult) model.DiffResult }
type IGitService ¶
type PushChangeResponse ¶
Click to show internal directories.
Click to hide internal directories.