Documentation
¶
Index ¶
- Constants
- func CreateArchive(ctx context.Context, src, dest string, matchFn IgnoreMatcherFn) error
- func DecryptAES(key, ciphertext []byte) ([]byte, error)
- func DecryptRSA(privateKey, ciphertext []byte) ([]byte, error)
- func GenerateRSAKeyPair() (public []byte, private []byte, err error)
- func MoveToRepositoryRoot() error
- func PKCS7Unpad(msg []byte, blockSize int) ([]byte, error)
- func Ptr[T any](v T) *T
- func UploadArchive(ctx context.Context, uploadURL, path string, uploadHeaders map[string]string, ...) (err error)
- type IgnoreMatcherFn
Constants ¶
const UserProvidedRunMetadataHeader = "Spacelift-User-Provided-Run-Metadata"
UserProvidedRunMetadataHeader is the HTTP header used to pass arbitrary metadata to runs when creating or confirming them.
Variables ¶
This section is empty.
Functions ¶
func CreateArchive ¶ added in v1.12.0
func CreateArchive(ctx context.Context, src, dest string, matchFn IgnoreMatcherFn) error
Create a tar.gz of the contents of src at dest. The contents of dest are filtered by the matchFn. To speed up processing of large ignored directories we also short circuit the file system walk if a directory is ignored.
func DecryptAES ¶
DecryptAES decrypts ciphertext in AES-256-CBC.
func DecryptRSA ¶
DecryptRSA decrypts ciphertext using private key (x509 format).
func GenerateRSAKeyPair ¶
GenerateRSAKeyPair generates a key pair suitable for encryption.
func MoveToRepositoryRoot ¶ added in v0.18.0
func MoveToRepositoryRoot() error
MoveToRepositoryRoot moves the current workdir to the git repository root.
func PKCS7Unpad ¶
PKCS7Unpad provides PKCS #7 unpadding mechanism.
Types ¶
type IgnoreMatcherFn ¶ added in v1.12.0
func GetIgnoreMatcherFn ¶ added in v0.18.0
func GetIgnoreMatcherFn(ctx context.Context, projectRoot *string, ignoreFiles []string) (IgnoreMatcherFn, error)
GetIgnoreMatcherFn creates an ignore-matcher for archiving purposes This function respects gitignore and terraformignore, and optionally if a projectRoot is provided it only include files from this root