pkg

package
v0.0.0-...-94a1dca Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SECRET_VALIDATOR_SHA1       string = "SHA-1"
	SECRET_VALIDATOR_URL_APPEND string = "URL_APPEND"
	SECRET_VALIDATOR_PLAIN_TEXT string = "PLAIN_TEXT"
)
View Source
const ActionEdited = "edited"
View Source
const ActionPublished = "published"
View Source
const BLOB_LATEST_RELEASE_FILE_NAME = "/tmp/" + LATEST_FILENAME // TODO:Have to change it to "/latest.txt"
View Source
const CACHE_KEY = "latest"
View Source
const EventTypeRelease = "release"
View Source
const LATEST_FILENAME = CACHE_KEY + ".txt" // TODO:Will Remove this before merging
View Source
const PrerequisitesMatcher = "<!--upgrade-prerequisites-required-->"
View Source
const TagLink = "https://github.com/devtron-labs/devtron/releases/tag"
View Source
const TimeFormatLayout = "2006-01-02T15:04:05Z"

Variables

This section is empty.

Functions

This section is empty.

Types

type CiBuildMetadataService

type CiBuildMetadataService interface {
	GetDockerfileTemplateMetadata() *common.DockerfileTemplateMetadata
	GetBuildpackMetadata() *common.BuildPackMetadata
}

type CiBuildMetadataServiceImpl

type CiBuildMetadataServiceImpl struct {
	Logger                     *zap.SugaredLogger
	BuildPackMetadata          *common.BuildPackMetadata
	DockerfileTemplateMetadata *common.DockerfileTemplateMetadata
}

func NewCiBuildMetadataServiceImpl

func NewCiBuildMetadataServiceImpl(logger *zap.SugaredLogger) *CiBuildMetadataServiceImpl

func (CiBuildMetadataServiceImpl) GetBuildpackMetadata

func (impl CiBuildMetadataServiceImpl) GetBuildpackMetadata() *common.BuildPackMetadata

func (CiBuildMetadataServiceImpl) GetDockerfileTemplateMetadata

func (impl CiBuildMetadataServiceImpl) GetDockerfileTemplateMetadata() *common.DockerfileTemplateMetadata

type ReleaseNoteService

type ReleaseNoteService interface {
	GetModules() ([]*common.Module, error)
	GetReleases() ([]*common.Release, error)
	UpdateReleases(requestBodyBytes []byte) (bool, error)
	GetModulesV2() ([]*common.Module, error)
	GetModuleByName(name string) (*common.Module, error)
	GetReleasesOnInitialisation()
}

type ReleaseNoteServiceImpl

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

func NewReleaseNoteServiceImpl

func NewReleaseNoteServiceImpl(logger *zap.SugaredLogger, client *util.GitHubClient,
	moduleConfig *util.ModuleConfig, blobConfig *util.BlobConfigVariables, blobStorageService *blob_storage.BlobStorageServiceImpl) (*ReleaseNoteServiceImpl, error)

func (*ReleaseNoteServiceImpl) GetModuleByName

func (impl *ReleaseNoteServiceImpl) GetModuleByName(name string) (*common.Module, error)

func (*ReleaseNoteServiceImpl) GetModules

func (impl *ReleaseNoteServiceImpl) GetModules() ([]*common.Module, error)

func (*ReleaseNoteServiceImpl) GetModulesV2

func (impl *ReleaseNoteServiceImpl) GetModulesV2() ([]*common.Module, error)

func (*ReleaseNoteServiceImpl) GetReleases

func (impl *ReleaseNoteServiceImpl) GetReleases() ([]*common.Release, error)

func (*ReleaseNoteServiceImpl) GetReleasesFromGithub

func (impl *ReleaseNoteServiceImpl) GetReleasesFromGithub() ([]*common.Release, bool)

func (*ReleaseNoteServiceImpl) GetReleasesFromGithubWithRetry

func (impl *ReleaseNoteServiceImpl) GetReleasesFromGithubWithRetry() ([]*common.Release, error)

func (*ReleaseNoteServiceImpl) GetReleasesOnInitialisation

func (impl *ReleaseNoteServiceImpl) GetReleasesOnInitialisation()

func (*ReleaseNoteServiceImpl) UpdateReleases

func (impl *ReleaseNoteServiceImpl) UpdateReleases(requestBodyBytes []byte) (bool, error)

type WebhookSecretValidator

type WebhookSecretValidator interface {
	ValidateSecret(r *http.Request, requestBodyBytes []byte) bool
}

type WebhookSecretValidatorImpl

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

func NewWebhookSecretValidatorImpl

func NewWebhookSecretValidatorImpl(Logger *zap.SugaredLogger, client *util.GitHubClient) *WebhookSecretValidatorImpl

func (*WebhookSecretValidatorImpl) ValidateSecret

func (impl *WebhookSecretValidatorImpl) ValidateSecret(r *http.Request, requestBodyBytes []byte) bool

Validate secret for some predefined algorithms : SHA1, URL_APPEND, PLAIN_TEXT URL_APPEND : Secret will come in URL (last path param of URL) PLAIN_TEXT : Plain text value in request header SHA1 : SHA1 encrypted text in request header

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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