gcputil

package
v1.6.13 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Close() error
}

type DatabaseInstance

type DatabaseInstance struct {
	Name        string `json:"name"`
	Project     string `json:"project"`
	DatabaseURL string `json:"databaseUrl"`
	Type        string `json:"type"`
	State       string `json:"state"`
}

DatabaseInstance represents a Firebase Realtime Database instance

type DefaultSupportedOAuthIdpConfig added in v1.6.0

type DefaultSupportedOAuthIdpConfig struct {
	Name         *string `json:"name,omitempty"`
	Enabled      *bool   `json:"enabled,omitempty"`
	ClientID     *string `json:"clientId,omitempty"`
	ClientSecret *string `json:"clientSecret,omitempty"`
}

type FirebaseDatabaseService

type FirebaseDatabaseService struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment
	// contains filtered or unexported fields
}

func NewFirebaseDatabaseService

func NewFirebaseDatabaseService(ctx context.Context, opts ...option.ClientOption) (*FirebaseDatabaseService, error)

NewFirebaseDatabaseService creates a new Firebase Realtime Database client to interact with the https://firebasedatabase.googleapis.com endpoints as there is no official golang client library

func (*FirebaseDatabaseService) DeleteDatabaseInstance

func (s *FirebaseDatabaseService) DeleteDatabaseInstance(ctx context.Context, parent, name string) error

DeleteDatabaseInstance deletes a Firebase Realtime Database instance

func (*FirebaseDatabaseService) DisableDatabaseInstance

func (s *FirebaseDatabaseService) DisableDatabaseInstance(ctx context.Context, parent, name string) error

DisableDatabaseInstance disables a Firebase Realtime Database instance

func (*FirebaseDatabaseService) ListDatabaseInstances

func (s *FirebaseDatabaseService) ListDatabaseInstances(ctx context.Context, parent string) ([]*DatabaseInstance, error)

ListDatabaseInstances lists Firebase Realtime Database instances

func (*FirebaseDatabaseService) ListDatabaseRegions

func (s *FirebaseDatabaseService) ListDatabaseRegions() []string

ListDatabaseRegions lists Firebase Realtime Database regions

type GCP

type GCP struct {
	Organizations []*Organization
	Projects      []*Project
	Regions       []string
	APIS          []string

	ProjectID string
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, projectID, impersonateServiceAccount string) (*GCP, error)

func (*GCP) GetClientOptions

func (g *GCP) GetClientOptions() []option.ClientOption

func (*GCP) GetCredentials

func (g *GCP) GetCredentials(ctx context.Context) (*google.Credentials, error)

func (*GCP) GetEnabledAPIs

func (g *GCP) GetEnabledAPIs() []string

func (*GCP) GetZones

func (g *GCP) GetZones(region string) []string

func (*GCP) HasOrganizations

func (g *GCP) HasOrganizations() bool

func (*GCP) HasProjects

func (g *GCP) HasProjects() bool

func (*GCP) ID

func (g *GCP) ID() string

func (*GCP) ImpersonateServiceAccount

func (g *GCP) ImpersonateServiceAccount(ctx context.Context, targetServiceAccount string) error

type IdentityPlatformService added in v1.6.0

type IdentityPlatformService struct {
	BasePath  string
	UserAgent string
	// contains filtered or unexported fields
}

IdentityPlatformService provides methods to interact with the Identity Platform API

func NewIdentityPlatformService added in v1.6.0

func NewIdentityPlatformService(ctx context.Context, opts ...option.ClientOption) (*IdentityPlatformService, error)

NewIdentityPlatformService creates a new Identity Platform client

func (*IdentityPlatformService) DeleteDefaultSupportedOAuthIdpConfig added in v1.6.0

func (s *IdentityPlatformService) DeleteDefaultSupportedOAuthIdpConfig(ctx context.Context, projectID, configID string) error

DeleteDefaultSupportedOAuthIdpConfig deletes an OAuth IDP configuration of a project

func (*IdentityPlatformService) DeleteOAuthIdpConfig added in v1.6.0

func (s *IdentityPlatformService) DeleteOAuthIdpConfig(ctx context.Context, projectID, configID string) error

DeleteOAuthIdpConfig deletes an OAuth IDP configuration of a project

func (*IdentityPlatformService) GetProjectConfig added in v1.6.0

func (s *IdentityPlatformService) GetProjectConfig(ctx context.Context, projectID string) (*ProjectConfig, error)

GetProjectConfig retrieves the configuration of a project

func (*IdentityPlatformService) ListDefaultSupportedOAuthIdpConfigs added in v1.6.0

func (s *IdentityPlatformService) ListDefaultSupportedOAuthIdpConfigs(ctx context.Context, projectID string) (*ListDefaultSupportedOAuthIdpConfigsResponse, error)

ListDefaultSupportedOAuthIdpConfigs lists the OAuth IDP configurations of a project

func (*IdentityPlatformService) ListOAuthIdpConfigs added in v1.6.0

func (s *IdentityPlatformService) ListOAuthIdpConfigs(ctx context.Context, projectID string) (*ListOAuthIdpConfigsResponse, error)

ListOAuthIdpConfigs lists the OAuth IDP configurations of a project

func (*IdentityPlatformService) UpdateProjectConfig added in v1.6.0

func (s *IdentityPlatformService) UpdateProjectConfig(ctx context.Context, projectID string, config *ProjectConfig) (*ProjectConfig, error)

UpdateProjectConfig updates the configuration of a project

type ListDefaultSupportedOAuthIdpConfigsResponse added in v1.6.0

type ListDefaultSupportedOAuthIdpConfigsResponse struct {
	DefaultSupportedIdpConfigs []*DefaultSupportedOAuthIdpConfig `json:"defaultSupportedIdpConfigs"`
}

type ListOAuthIdpConfigsResponse added in v1.6.0

type ListOAuthIdpConfigsResponse struct {
	OAuthIdpConfigs []*OAuthIdpConfig `json:"oauthIdpConfigs"`
}

type MFAConfig added in v1.6.0

type MFAConfig struct {
	State string `json:"state"`
}

type OAuthIdpConfig added in v1.6.0

type OAuthIdpConfig struct {
	Name        *string `json:"name"`
	ClientId    *string `json:"clientId"`
	Issuer      *string `json:"issuer"`
	DisplayName *string `json:"displayName"`
	Enabled     *bool   `json:"enabled"`
}

type Organization

type Organization struct {
	Name        string
	DisplayName string
}

func (*Organization) ID

func (o *Organization) ID() string

type Project

type Project struct {
	Name      string
	ProjectID string
}

func (*Project) ID

func (p *Project) ID() string

type ProjectConfig added in v1.6.0

type ProjectConfig struct {
	Name                     string        `json:"name"`
	AutoDeleteAnonymousUsers bool          `json:"autodeleteAnonymousUsers"`
	SignIn                   *SignInConfig `json:"signIn,omitempty"`
	MFA                      *MFAConfig    `json:"mfa,omitempty"`
}

ProjectConfig represents the configuration of a project in Identity Platform

type ProviderConfig added in v1.6.0

type ProviderConfig struct {
	Enabled bool `json:"enabled"`
}

type SignInConfig added in v1.6.0

type SignInConfig struct {
	Anonymous *ProviderConfig `json:"anonymous,omitempty"`
	Email     *ProviderConfig `json:"email,omitempty"`
	Phone     *ProviderConfig `json:"phoneNumber,omitempty"`
}

Jump to

Keyboard shortcuts

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