gcputil

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 14 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 FirebaseDBClient

type FirebaseDBClient struct {
	// contains filtered or unexported fields
}

FirebaseDBClient is a client to interact with the Firebase Realtime Database API

func NewFirebaseDBClient

func NewFirebaseDBClient(ctx context.Context) (*FirebaseDBClient, error)

NewFirebaseDBClient 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 (*FirebaseDBClient) DeleteDatabaseInstance

func (c *FirebaseDBClient) DeleteDatabaseInstance(ctx context.Context, parent, name string) error

DeleteDatabaseInstance deletes a Firebase Realtime Database instance

func (*FirebaseDBClient) DisableDatabaseInstance

func (c *FirebaseDBClient) DisableDatabaseInstance(ctx context.Context, parent, name string) error

DisableDatabaseInstance disables a Firebase Realtime Database instance

func (*FirebaseDBClient) ListDatabaseInstances

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

ListDatabaseInstances lists Firebase Realtime Database instances

func (*FirebaseDBClient) ListDatabaseRegions

func (c *FirebaseDBClient) ListDatabaseRegions() []string

ListDatabaseRegions lists Firebase Realtime Database regions

type GCP

type GCP struct {
	Organizations []*Organization
	Projects      []*Project
	Regions       []string
	// contains filtered or unexported fields
}

func New

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

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

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

Jump to

Keyboard shortcuts

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