Documentation
¶
Index ¶
- Constants
- Variables
- func Contains(s []string, str string) bool
- func FileSizeMB(bytes int64) float64
- func ListMassdriverArtifactDefinitions() ([]string, error)
- func RemoveDuplicateValues(stringSlice []string) []string
- func WriteFile(filePath string, data []byte, errToBytes error) error
- type CopyConfig
- type CopyStats
Constants ¶
View Source
const ( MassdriverURL = "https://api.massdriver.cloud/" MassdriverYamlFilename = "massdriver.yaml" ArtifactsSchemaFilename = "schema-artifacts.json" ConnectionsSchemaFilename = "schema-connections.json" ParamsSchemaFilename = "schema-params.json" UISchemaFilename = "schema-ui.json" DevParamsFilename = "_params.auto.tfvars.json" MaxBundleSizeMB = 10 MaxFileSizeMB = 1 )
View Source
const ( Read = 04 Write = 02 Execute = 01 UserShift = 6 GroupShift = 3 OtherShift = 0 UserRead = Read << UserShift UserWrite = Write << UserShift UserExecute = Execute << UserShift UserRW = UserRead | UserWrite UserRWX = UserRW | UserExecute GroupRead = Read << GroupShift GroupWrite = Write << GroupShift GroupExecute = Execute << GroupShift GroupRW = GroupRead | GroupWrite GroupRWX = GroupRW | GroupExecute OtherRead = Read << OtherShift OtherWrite = Write << OtherShift OtherExecute = Execute << OtherShift OtherRW = OtherRead | OtherWrite OtherRWX = OtherRW | OtherExecute AllRead = UserRead | GroupRead | OtherRead AllWrite = UserWrite | GroupWrite | OtherWrite AllExecute = UserExecute | GroupExecute | OtherExecute AllRX = AllRead | AllExecute AllRW = AllRead | AllWrite AllRWX = AllRW | AllExecute )
named constants for common unix file permissions logic adapted from https://stackoverflow.com/questions/28969455/how-to-properly-instantiate-os-filemode/42718395#42718395
Variables ¶
View Source
var FileAllows = []string{ MassdriverYamlFilename, ArtifactsSchemaFilename, ConnectionsSchemaFilename, ParamsSchemaFilename, UISchemaFilename, "src", }
View Source
var FileIgnores = []string{
".terraform",
".tfstate",
".tfvars",
".md",
".git",
".DS_Store",
}
View Source
var MassdriverArtifactDefinitions = []string{
"massdriver/aws-dynamodb-table",
"massdriver/aws-efs-file-system",
"massdriver/aws-eventbridge",
"massdriver/aws-iam-role",
"massdriver/aws-s3-bucket",
"massdriver/aws-sns-topic",
"massdriver/aws-sqs-queue",
"massdriver/aws-vpc",
"massdriver/azure-communication-service",
"massdriver/azure-data-lake-storage",
"massdriver/azure-databricks-workspace",
"massdriver/azure-fhir-service",
"massdriver/azure-service-principal",
"massdriver/azure-storage-account",
"massdriver/azure-virtual-network",
"massdriver/cosmosdb-sql-authentication",
"massdriver/elasticsearch-authentication",
"massdriver/gcp-bucket-https",
"massdriver/gcp-cloud-function",
"massdriver/gcp-firebase-authentication",
"massdriver/gcp-global-network",
"massdriver/gcp-pubsub-subscription",
"massdriver/gcp-pubsub-topic",
"massdriver/gcp-service-account",
"massdriver/gcp-subnetwork",
"massdriver/kafka-authentication",
"massdriver/kubernetes-cluster",
"massdriver/mongo-authentication",
"massdriver/mysql-authentication",
"massdriver/postgresql-authentication",
"massdriver/redis-authentication",
"massdriver/sftp-authentication",
}
Functions ¶
func FileSizeMB ¶ added in v0.3.0
func ListMassdriverArtifactDefinitions ¶ added in v0.3.0
func RemoveDuplicateValues ¶ added in v0.3.0
Types ¶
type CopyConfig ¶ added in v0.3.0
type CopyStats ¶ added in v0.3.0
type CopyStats struct {
FolderSize int64
}
func CopyFolder ¶ added in v0.3.0
func CopyFolder(src, dstDir string, config *CopyConfig) (CopyStats, error)
Click to show internal directories.
Click to hide internal directories.