Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSourceDefinition ¶
func BuildSourceDefinition(ctx context.Context, client *functions.FunctionClient, fileUtil FileUtil, opts config.DeployOptions) (*functionspb.Source, error)
BuildSourceDefinition creates a new Source object for a cloud function based on the provided DeployOptions.
Types ¶
type MockFileUtil ¶
func (MockFileUtil) ArchiveDirectoryContentIntoZip ¶
func (fileUtil MockFileUtil) ArchiveDirectoryContentIntoZip(_ string) (string, error)
func (MockFileUtil) CleanUp ¶
func (fileUtil MockFileUtil) CleanUp(_ string) error
func (MockFileUtil) UploadFileToSignedURL ¶
func (fileUtil MockFileUtil) UploadFileToSignedURL(_ context.Context, _, _ string) error
type OsFileUtil ¶
type OsFileUtil struct{}
func (OsFileUtil) ArchiveDirectoryContentIntoZip ¶
func (fileUtil OsFileUtil) ArchiveDirectoryContentIntoZip(dir string) (string, error)
ArchiveDirectoryContentIntoZip validates the directory, archives its contect and returns the file name of the created zip.
func (OsFileUtil) CleanUp ¶
func (fileUtil OsFileUtil) CleanUp(zipFile string) error
CleanUp removes the directory of the zip provided with all its contect.
func (OsFileUtil) UploadFileToSignedURL ¶
func (fileUtil OsFileUtil) UploadFileToSignedURL(ctx context.Context, uploadURL, file string) error
UploadFileToSignedURL uploads the file from the specified path to the provided URL.
Click to show internal directories.
Click to hide internal directories.