services

package
v0.0.0-...-e0ee185 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NEWV2     DiffTypeV2 = "NEW"
	CHANGEDV2 DiffTypeV2 = "CHANGED"
	DELETEDV2 DiffTypeV2 = "DELETED"

	GROUP          DiffResult = "GROUP"
	CONFIG         DiffResult = "CONFIG"
	STRATEGY       DiffResult = "STRATEGY"
	STRATEGY_VALUE DiffResult = "STRATEGY_VALUE"
	COMPONENT      DiffResult = "COMPONENT"
)

Variables

This section is empty.

Functions

func CheckSnapshotDiff

func CheckSnapshotDiff(left model.Snapshot, right model.Snapshot, diffType DiffType) model.Snapshot

func CheckSnapshotDiffV2

func CheckSnapshotDiffV2(left model.Snapshot, right model.Snapshot, diffType DiffTypeV2) model.DiffResult

func FetchPayloadFromGraphQLEndpoint

func FetchPayloadFromGraphQLEndpoint(url string, token string, domainId string, environment string) (string, error)

func FormatJSON

func FormatJSON(jsonString string) string

func GenerateBearerToken

func GenerateBearerToken(apiKey string, subject string) (string, error)

func GetEnv

func GetEnv(key string) string

func InitEnv

func InitEnv()

func MergeResults

func MergeResults(diffResults []model.DiffResult) model.DiffResult

func NewJsonStringFromSnapshot

func NewJsonStringFromSnapshot(snapshot model.Snapshot) string

func NewJsonStringFromSnapshotV2

func NewJsonStringFromSnapshotV2(snapshot model.DiffResult) string

func NewSnapshotFromJson

func NewSnapshotFromJson(jsonData []byte) model.Snapshot

func ReadJsonFromFile

func ReadJsonFromFile(path string) string

Types

type DiffResult

type DiffResult string

type DiffType

type DiffType int
const (
	NEW     DiffType = iota
	CHANGED DiffType = iota
	DELETED DiffType = iota
)

type DiffTypeV2

type DiffTypeV2 string

type GoGitService

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

func (*GoGitService) GetFileContent

func (gs *GoGitService) GetFileContent(filePath string) (string, error)

func (*GoGitService) GetLastCommitDate

func (gs *GoGitService) GetLastCommitDate() (time.Time, error)

func (*GoGitService) GetLastCommitHash

func (gs *GoGitService) GetLastCommitHash() (string, error)

type GraphQLRequest

type GraphQLRequest struct {
	Query string `json:"query"`
}

Jump to

Keyboard shortcuts

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