Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions firebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"firebase.google.com/go/v4/iid"
"firebase.google.com/go/v4/internal"
"firebase.google.com/go/v4/messaging"
"firebase.google.com/go/v4/projectmanagement"
"firebase.google.com/go/v4/remoteconfig"
"firebase.google.com/go/v4/storage"
"google.golang.org/api/option"
Expand Down Expand Up @@ -139,6 +140,15 @@ func (a *App) AppCheck(ctx context.Context) (*appcheck.Client, error) {
return appcheck.NewClient(ctx, conf)
}

// ProjectManagement returns an instance of projects.Client.
func (a *App) ProjectManagement(ctx context.Context) (*projectmanagement.Client, error) {
conf := &internal.ProjectManagementConfig{
ProjectID: a.projectID,
Opts: a.opts,
}
return projectmanagement.NewClient(ctx, conf)
}

// RemoteConfig returns an instance of remoteconfig.Client.
func (a *App) RemoteConfig(ctx context.Context) (*remoteconfig.Client, error) {
conf := &internal.RemoteConfigClientConfig{
Expand Down
6 changes: 6 additions & 0 deletions internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ type AppCheckConfig struct {
ProjectID string
}

// ProjectManagementConfig represents the configuration of Firebase Management service.
type ProjectManagementConfig struct {
Opts []option.ClientOption
ProjectID string
}

// MockTokenSource is a TokenSource implementation that can be used for testing.
type MockTokenSource struct {
AccessToken string
Expand Down
Loading