whitelist

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Git *gitlab.Client
View Source
var KMSKeyId = envy.Get("WHITELIST_KMS_KEY", "")
View Source
var Svc *kms.KMS

Functions

func CheckTimeElapsed

func CheckTimeElapsed(timeOfWhitelist int64, projectID int) bool

CheckTimeElapsed Checks if the time elapsed since the project was whitelisted is more than 7 days

func CreateVariable

func CreateVariable(projectID int, value string) (bool, error, string)

CreateVariable Creates a variable in GitLab from a project ID and a value

func VerifyWhitelist

func VerifyWhitelist(projectID int) bool

func WhitelistProject

func WhitelistProject(projectId int, permanent bool, projectType string) (int, string)

Types

type WhitelistVariable

type WhitelistVariable struct {
	ProjectIDCipher string `json:"project-id-cipher"`
	Time            string `json:"time"` // Permanent or timestamp

	ProjectType string `json:"project-type"` // legacy-pipeline, docker-pipeline, or no-pipeline.
}

func GetVariable

func GetVariable(projectID int, key string) (bool, WhitelistVariable)

GetVariable Returns the variable value as a WhitelistVariable struct with th project ID decrypted

Jump to

Keyboard shortcuts

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