Documentation ¶
Index ¶
- Variables
- func FixupGcpConfig(vCpu float32, memoryMiB uint64) (cpu float64, memory uint)
- func IsNotFound(err error) bool
- type Gcp
- func (gcp Gcp) CreateUploadURL(ctx context.Context, bucketName, objectName, serviceAccount string) (string, error)
- func (gcp Gcp) EnsureAPIsEnabled(ctx context.Context, apis ...string) error
- func (gcp Gcp) EnsureArtifactRegistryExists(ctx context.Context, repoName string) (string, error)
- func (gcp Gcp) EnsureBucketExists(ctx context.Context, prefix string) (string, error)
- func (gcp Gcp) EnsureDNSZoneExists(ctx context.Context, name, domain, description string) (*dns.ManagedZone, error)
- func (gcp Gcp) EnsureProjectExists(ctx context.Context, projectName string) (*resourcepb.Project, error)
- func (gcp Gcp) EnsureRoleExists(ctx context.Context, roleId, title, description string, permissions []string) (string, error)
- func (gcp Gcp) EnsureServiceAccountExists(ctx context.Context, serviceAccountId, displayName, description string) (string, error)
- func (gcp Gcp) EnsureServiceAccountHasArtifactRegistryRoles(ctx context.Context, repo, serviceAccount string, roles []string) error
- func (gcp Gcp) EnsureServiceAccountHasBucketRoles(ctx context.Context, bucketName, serviceAccount string, roles []string) error
- func (gcp Gcp) EnsureServiceAccountHasRoles(ctx context.Context, serviceAccount string, roles []string) error
- func (gcp Gcp) EnsureUserHasServiceAccountRoles(ctx context.Context, user, serviceAccount string, roles []string) error
- func (gcp Gcp) GetBucketObject(ctx context.Context, bucketName, objectName string) ([]byte, error)
- func (gcp Gcp) GetBucketWithPrefix(ctx context.Context, prefix string) (string, error)
- func (gcp Gcp) GetCurrentAccountEmail(ctx context.Context) (string, error)
- func (gcp Gcp) GetDNSZone(ctx context.Context, name string) (*dns.ManagedZone, error)
- func (gcp Gcp) GetExecutionEnv(ctx context.Context, executionName string) (map[string]string, error)
- func (gcp Gcp) GetProjectNumber(ctx context.Context) (int64, error)
- func (gcp Gcp) IterateBucketObjects(ctx context.Context, bucketName, prefix string, ...) error
- func (gcp Gcp) NewTailer(ctx context.Context) (*Tailer, error)
- func (gcp Gcp) Run(ctx context.Context, jobId string, env map[string]string, cmd ...string) (string, error)
- func (gcp Gcp) SetupJob(ctx context.Context, jobId, serviceAccount string, ...) error
- func (gcp Gcp) SignBytes(ctx context.Context, b []byte, name string) ([]byte, error)
- type ProjectId
- type Tailer
Constants ¶
This section is empty.
Variables ¶
View Source
var FindGoogleDefaultCredentials func(ctx context.Context, scopes ...string) (*google.Credentials, error) = google.FindDefaultCredentials
Functions ¶
func FixupGcpConfig ¶
FIXME: Add tests
func IsNotFound ¶
Types ¶
type Gcp ¶
func (Gcp) CreateUploadURL ¶
func (Gcp) EnsureAPIsEnabled ¶
func (Gcp) EnsureArtifactRegistryExists ¶
func (Gcp) EnsureBucketExists ¶
func (Gcp) EnsureDNSZoneExists ¶
func (Gcp) EnsureProjectExists ¶
func (Gcp) EnsureRoleExists ¶
func (Gcp) EnsureServiceAccountExists ¶
func (Gcp) EnsureServiceAccountHasArtifactRegistryRoles ¶
func (Gcp) EnsureServiceAccountHasBucketRoles ¶
func (Gcp) EnsureServiceAccountHasRoles ¶
func (Gcp) EnsureUserHasServiceAccountRoles ¶
func (gcp Gcp) EnsureUserHasServiceAccountRoles(ctx context.Context, user, serviceAccount string, roles []string) error
TODO: Investigate if this can be merged with EnsureServiceAccountHasRoles
func (Gcp) GetBucketObject ¶
func (Gcp) GetBucketWithPrefix ¶
func (Gcp) GetCurrentAccountEmail ¶
func (Gcp) GetDNSZone ¶
func (Gcp) GetExecutionEnv ¶
func (Gcp) IterateBucketObjects ¶
type ProjectId ¶
type ProjectId string
func ProjectIDFromName ¶
A project ID has the following requirements:
- Must be 6 to 30 characters in length.
- Can only contain lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Cannot end with a hyphen.
- Cannot be in use or previously used; this includes deleted projects.
- Cannot contain restricted strings, such as google, null, undefined, and ssl.
Compose Project Name:
- must contain only lowercase letters, decimal digits, dashes, and underscores,
- and must begin with a lowercase letter or decimal digit
Differences:
- Project ID cannot contain underscores
- Project ID cannot start with a digit
- Project ID cannot end with a hyphen
- Project ID cannot contain restricted strings: google, null, undefined, ssl
- Note: console test shows only google is restricted
- Project ID must be 6 ~ 30 characters
- Project ID must be unique including deleted projects
type Tailer ¶
type Tailer struct {
// contains filtered or unexported fields
}
func (*Tailer) AddQuerySet ¶
func (*Tailer) SetBaseQuery ¶
Click to show internal directories.
Click to hide internal directories.