Documentation
¶
Index ¶
- Constants
- Variables
- func CatalogServices() []string
- type ConfigProvider
- type EnforceConfigProvider
- type Handler
- func (h *Handler) Addr() string
- func (h *Handler) Enforcement() gcpenforce.Settings
- func (h *Handler) EnforcementGate() *gcpenforce.Gate
- func (h *Handler) ExtractOperation(*echo.Context) string
- func (h *Handler) ExtractResource(*echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) ProjectsAPI() resourcemanagerpb.ProjectsServer
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) ServiceUsageAPI() serviceusagepb.ServiceUsageServer
- func (h *Handler) SetEnforcement(s gcpenforce.Settings)
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- type InMemoryBackend
- func (b *InMemoryBackend) BatchEnableServices(in *serviceusagepb.BatchEnableServicesRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) BatchGetServices(in *serviceusagepb.BatchGetServicesRequest) (*serviceusagepb.BatchGetServicesResponse, error)
- func (b *InMemoryBackend) BillingInfo(ref string) (billingInfo, error)
- func (b *InMemoryBackend) CheckProject(project, service string) error
- func (b *InMemoryBackend) CheckServiceEnabled(project, service string) error
- func (b *InMemoryBackend) CreateFolder(in *resourcemanagerpb.CreateFolderRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateProject(in *resourcemanagerpb.CreateProjectRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateTagBinding(in *resourcemanagerpb.CreateTagBindingRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateTagKey(in *resourcemanagerpb.CreateTagKeyRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateTagValue(in *resourcemanagerpb.CreateTagValueRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) DeleteFolder(in *resourcemanagerpb.DeleteFolderRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) DeleteProject(in *resourcemanagerpb.DeleteProjectRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) DeleteTagBinding(in *resourcemanagerpb.DeleteTagBindingRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) DeleteTagKey(in *resourcemanagerpb.DeleteTagKeyRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) DeleteTagValue(in *resourcemanagerpb.DeleteTagValueRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) DisableService(in *serviceusagepb.DisableServiceRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) EnableService(in *serviceusagepb.EnableServiceRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) GetFolder(name string) (*resourcemanagerpb.Folder, error)
- func (b *InMemoryBackend) GetIamPolicy(in *iampb.GetIamPolicyRequest) (*iampb.Policy, error)
- func (b *InMemoryBackend) GetNamespacedTagKey(ns string) (*resourcemanagerpb.TagKey, error)
- func (b *InMemoryBackend) GetNamespacedTagValue(ns string) (*resourcemanagerpb.TagValue, error)
- func (b *InMemoryBackend) GetOrganization(name string) (*resourcemanagerpb.Organization, error)
- func (b *InMemoryBackend) GetProject(name string) (*resourcemanagerpb.Project, error)
- func (b *InMemoryBackend) GetService(name string) (*serviceusagepb.Service, error)
- func (b *InMemoryBackend) GetTagKey(name string) (*resourcemanagerpb.TagKey, error)
- func (b *InMemoryBackend) GetTagValue(name string) (*resourcemanagerpb.TagValue, error)
- func (b *InMemoryBackend) ListFolders(in *resourcemanagerpb.ListFoldersRequest) (*resourcemanagerpb.ListFoldersResponse, error)
- func (b *InMemoryBackend) ListProjects(in *resourcemanagerpb.ListProjectsRequest) (*resourcemanagerpb.ListProjectsResponse, error)
- func (b *InMemoryBackend) ListServices(in *serviceusagepb.ListServicesRequest) (*serviceusagepb.ListServicesResponse, error)
- func (b *InMemoryBackend) ListTagBindings(in *resourcemanagerpb.ListTagBindingsRequest) (*resourcemanagerpb.ListTagBindingsResponse, error)
- func (b *InMemoryBackend) ListTagKeys(in *resourcemanagerpb.ListTagKeysRequest) (*resourcemanagerpb.ListTagKeysResponse, error)
- func (b *InMemoryBackend) ListTagValues(in *resourcemanagerpb.ListTagValuesRequest) (*resourcemanagerpb.ListTagValuesResponse, error)
- func (b *InMemoryBackend) MoveFolder(in *resourcemanagerpb.MoveFolderRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) MoveProject(in *resourcemanagerpb.MoveProjectRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) OrganizationName() string
- func (b *InMemoryBackend) ProjectIDs() []string
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SearchFolders(in *resourcemanagerpb.SearchFoldersRequest) (*resourcemanagerpb.SearchFoldersResponse, error)
- func (b *InMemoryBackend) SearchOrganizations(in *resourcemanagerpb.SearchOrganizationsRequest) (*resourcemanagerpb.SearchOrganizationsResponse, error)
- func (b *InMemoryBackend) SearchProjects(in *resourcemanagerpb.SearchProjectsRequest) (*resourcemanagerpb.SearchProjectsResponse, error)
- func (b *InMemoryBackend) SetBillingAccount(ref, account string) (billingInfo, error)
- func (b *InMemoryBackend) SetClock(now func() time.Time)
- func (b *InMemoryBackend) SetIamPolicy(in *iampb.SetIamPolicyRequest) (*iampb.Policy, error)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) TestIamPermissions(in *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error)
- func (b *InMemoryBackend) UndeleteFolder(in *resourcemanagerpb.UndeleteFolderRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UndeleteProject(in *resourcemanagerpb.UndeleteProjectRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateFolder(in *resourcemanagerpb.UpdateFolderRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateProject(in *resourcemanagerpb.UpdateProjectRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateTagKey(in *resourcemanagerpb.UpdateTagKeyRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateTagValue(in *resourcemanagerpb.UpdateTagValueRequest) (*longrunningpb.Operation, error)
- type Provider
- type Settings
Constants ¶
const ( // DefaultPort is the dedicated gRPC and REST listener's default TCP port. DefaultPort = 8148 // DefaultOrganizationID is the id of the single emulated organization. DefaultOrganizationID = "123456789012" // DefaultDomain is the display name (the domain) of the emulated organization. DefaultDomain = "gopherstack.local" // DefaultSeedProjects are the project ids created at startup. DefaultSeedProjects = "gopherstack-test" // DefaultDeleteRetention is how long a DELETE_REQUESTED project or folder stays restorable. DefaultDeleteRetention = 30 * 24 * time.Hour )
Variables ¶
var ErrNilAppContext = errors.New("gcpresourcemanager: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
Functions ¶
func CatalogServices ¶
func CatalogServices() []string
CatalogServices returns the googleapis.com names of every service the emulator can enable, sorted.
Types ¶
type ConfigProvider ¶
type ConfigProvider interface {
GetGCPResourceManagerSettings() Settings
}
ConfigProvider extracts Resource Manager configuration from the AppContext Config.
type EnforceConfigProvider ¶
type EnforceConfigProvider interface {
GetGCPEnforceSettings() gcpenforce.Settings
}
EnforceConfigProvider extracts the opt-in GCP enforcement switches from the AppContext Config.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
Port int
// contains filtered or unexported fields
}
Handler serves Resource Manager (v3 gRPC and REST, v1 REST) and Service Usage on a dedicated listener.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a Handler; callers override Port from Settings.
func (*Handler) Enforcement ¶
func (h *Handler) Enforcement() gcpenforce.Settings
Enforcement returns the active enforcement switches.
func (*Handler) EnforcementGate ¶
func (h *Handler) EnforcementGate() *gcpenforce.Gate
EnforcementGate returns the Gate the other GCP services consult, or nil when enforcement is off.
func (*Handler) ExtractOperation ¶
ExtractOperation is unused: requests never reach the shared router.
func (*Handler) ExtractResource ¶
ExtractResource is unused: requests never reach the shared router.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations lists the supported gRPC methods.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns a 404 handler; the real API is on the dedicated port.
func (*Handler) MatchPriority ¶
MatchPriority is irrelevant because RouteMatcher never matches.
func (*Handler) ProjectsAPI ¶
func (h *Handler) ProjectsAPI() resourcemanagerpb.ProjectsServer
ProjectsAPI returns the Projects server for in-process callers.
func (*Handler) RouteMatcher ¶
RouteMatcher never matches: the service runs on its own listener.
func (*Handler) ServiceUsageAPI ¶
func (h *Handler) ServiceUsageAPI() serviceusagepb.ServiceUsageServer
ServiceUsageAPI returns the Service Usage server for in-process callers.
func (*Handler) SetEnforcement ¶
func (h *Handler) SetEnforcement(s gcpenforce.Settings)
SetEnforcement turns the opt-in project and API-enablement checks of the other GCP services on or off.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend holds Resource Manager and Service Usage state under one lock.
func NewBackend ¶
func NewBackend(s Settings) *InMemoryBackend
NewBackend creates a backend with the organization and seed projects of s.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates a backend for the default organization, with no projects.
func (*InMemoryBackend) BatchEnableServices ¶
func (b *InMemoryBackend) BatchEnableServices(in *serviceusagepb.BatchEnableServicesRequest) ( *longrunningpb.Operation, error, )
BatchEnableServices enables up to 20 services atomically: one unknown service fails the whole batch.
func (*InMemoryBackend) BatchGetServices ¶
func (b *InMemoryBackend) BatchGetServices(in *serviceusagepb.BatchGetServicesRequest) ( *serviceusagepb.BatchGetServicesResponse, error, )
BatchGetServices returns the state of up to 30 services of one project.
func (*InMemoryBackend) BillingInfo ¶
func (b *InMemoryBackend) BillingInfo(ref string) (billingInfo, error)
BillingInfo returns the Cloud Billing association of a project (billingAccountName is empty when none).
func (*InMemoryBackend) CheckProject ¶
func (b *InMemoryBackend) CheckProject(project, service string) error
CheckProject returns CONSUMER_INVALID for service unless project (id or number) exists and is ACTIVE.
func (*InMemoryBackend) CheckServiceEnabled ¶
func (b *InMemoryBackend) CheckServiceEnabled(project, service string) error
CheckServiceEnabled returns the SERVICE_DISABLED error Google APIs answer with when project has not enabled service, and nil when it has (or the service is not in the catalog). An unknown project is CONSUMER_INVALID.
func (*InMemoryBackend) CreateFolder ¶
func (b *InMemoryBackend) CreateFolder(in *resourcemanagerpb.CreateFolderRequest) (*longrunningpb.Operation, error)
CreateFolder creates a folder under the organization or another folder.
func (*InMemoryBackend) CreateProject ¶
func (b *InMemoryBackend) CreateProject(in *resourcemanagerpb.CreateProjectRequest) (*longrunningpb.Operation, error)
CreateProject creates a project; the returned operation is already done.
func (*InMemoryBackend) CreateTagBinding ¶
func (b *InMemoryBackend) CreateTagBinding(in *resourcemanagerpb.CreateTagBindingRequest) ( *longrunningpb.Operation, error, )
CreateTagBinding binds a tag value to a resource; a resource holds one value per tag key.
func (*InMemoryBackend) CreateTagKey ¶
func (b *InMemoryBackend) CreateTagKey(in *resourcemanagerpb.CreateTagKeyRequest) (*longrunningpb.Operation, error)
CreateTagKey creates a tag key under the organization or a project.
func (*InMemoryBackend) CreateTagValue ¶
func (b *InMemoryBackend) CreateTagValue(in *resourcemanagerpb.CreateTagValueRequest) ( *longrunningpb.Operation, error, )
CreateTagValue creates a tag value under a tag key.
func (*InMemoryBackend) DeleteFolder ¶
func (b *InMemoryBackend) DeleteFolder(in *resourcemanagerpb.DeleteFolderRequest) (*longrunningpb.Operation, error)
DeleteFolder marks an empty folder DELETE_REQUESTED; deleting a requested folder is a no-op.
func (*InMemoryBackend) DeleteProject ¶
func (b *InMemoryBackend) DeleteProject(in *resourcemanagerpb.DeleteProjectRequest) (*longrunningpb.Operation, error)
DeleteProject marks an ACTIVE project DELETE_REQUESTED; deleting a requested project is a no-op.
func (*InMemoryBackend) DeleteTagBinding ¶
func (b *InMemoryBackend) DeleteTagBinding(in *resourcemanagerpb.DeleteTagBindingRequest) ( *longrunningpb.Operation, error, )
DeleteTagBinding removes a tag binding.
func (*InMemoryBackend) DeleteTagKey ¶
func (b *InMemoryBackend) DeleteTagKey(in *resourcemanagerpb.DeleteTagKeyRequest) (*longrunningpb.Operation, error)
DeleteTagKey deletes a tag key that has no tag values.
func (*InMemoryBackend) DeleteTagValue ¶
func (b *InMemoryBackend) DeleteTagValue(in *resourcemanagerpb.DeleteTagValueRequest) ( *longrunningpb.Operation, error, )
DeleteTagValue deletes a tag value that is not bound to any resource.
func (*InMemoryBackend) DisableService ¶
func (b *InMemoryBackend) DisableService(in *serviceusagepb.DisableServiceRequest) (*longrunningpb.Operation, error)
DisableService disables an enabled service, and its enabled dependents when asked to.
func (*InMemoryBackend) EnableService ¶
func (b *InMemoryBackend) EnableService(in *serviceusagepb.EnableServiceRequest) (*longrunningpb.Operation, error)
EnableService enables a service and its dependencies; enabling an enabled service succeeds.
func (*InMemoryBackend) GetFolder ¶
func (b *InMemoryBackend) GetFolder(name string) (*resourcemanagerpb.Folder, error)
GetFolder returns a folder, including one that is DELETE_REQUESTED.
func (*InMemoryBackend) GetIamPolicy ¶
func (b *InMemoryBackend) GetIamPolicy(in *iampb.GetIamPolicyRequest) (*iampb.Policy, error)
GetIamPolicy returns the policy of a resource at the requested version.
func (*InMemoryBackend) GetNamespacedTagKey ¶
func (b *InMemoryBackend) GetNamespacedTagKey(ns string) (*resourcemanagerpb.TagKey, error)
GetNamespacedTagKey finds a tag key by "{org id or project id}/{short name}".
func (*InMemoryBackend) GetNamespacedTagValue ¶
func (b *InMemoryBackend) GetNamespacedTagValue(ns string) (*resourcemanagerpb.TagValue, error)
GetNamespacedTagValue finds a tag value by "{org or project id}/{key}/{value}".
func (*InMemoryBackend) GetOrganization ¶
func (b *InMemoryBackend) GetOrganization(name string) (*resourcemanagerpb.Organization, error)
GetOrganization returns the emulated organization.
func (*InMemoryBackend) GetProject ¶
func (b *InMemoryBackend) GetProject(name string) (*resourcemanagerpb.Project, error)
GetProject returns a project by number or id, including one that is DELETE_REQUESTED.
func (*InMemoryBackend) GetService ¶
func (b *InMemoryBackend) GetService(name string) (*serviceusagepb.Service, error)
GetService returns a service's state for a project.
func (*InMemoryBackend) GetTagKey ¶
func (b *InMemoryBackend) GetTagKey(name string) (*resourcemanagerpb.TagKey, error)
GetTagKey returns a tag key.
func (*InMemoryBackend) GetTagValue ¶
func (b *InMemoryBackend) GetTagValue(name string) (*resourcemanagerpb.TagValue, error)
GetTagValue returns a tag value.
func (*InMemoryBackend) ListFolders ¶
func (b *InMemoryBackend) ListFolders(in *resourcemanagerpb.ListFoldersRequest) ( *resourcemanagerpb.ListFoldersResponse, error, )
ListFolders lists the direct child folders of an organization or folder, ordered by display name.
func (*InMemoryBackend) ListProjects ¶
func (b *InMemoryBackend) ListProjects(in *resourcemanagerpb.ListProjectsRequest) ( *resourcemanagerpb.ListProjectsResponse, error, )
ListProjects lists the direct children of a folder or organization, ordered by display name.
func (*InMemoryBackend) ListServices ¶
func (b *InMemoryBackend) ListServices(in *serviceusagepb.ListServicesRequest) ( *serviceusagepb.ListServicesResponse, error, )
ListServices lists the catalog's services with their state for a project, ordered by name.
func (*InMemoryBackend) ListTagBindings ¶
func (b *InMemoryBackend) ListTagBindings(in *resourcemanagerpb.ListTagBindingsRequest) ( *resourcemanagerpb.ListTagBindingsResponse, error, )
ListTagBindings lists the tag bindings of a resource.
func (*InMemoryBackend) ListTagKeys ¶
func (b *InMemoryBackend) ListTagKeys(in *resourcemanagerpb.ListTagKeysRequest) ( *resourcemanagerpb.ListTagKeysResponse, error, )
ListTagKeys lists the tag keys of an organization or project.
func (*InMemoryBackend) ListTagValues ¶
func (b *InMemoryBackend) ListTagValues(in *resourcemanagerpb.ListTagValuesRequest) ( *resourcemanagerpb.ListTagValuesResponse, error, )
ListTagValues lists the values of a tag key.
func (*InMemoryBackend) MoveFolder ¶
func (b *InMemoryBackend) MoveFolder(in *resourcemanagerpb.MoveFolderRequest) (*longrunningpb.Operation, error)
MoveFolder re-parents an ACTIVE folder under the organization or another active folder.
func (*InMemoryBackend) MoveProject ¶
func (b *InMemoryBackend) MoveProject(in *resourcemanagerpb.MoveProjectRequest) (*longrunningpb.Operation, error)
MoveProject re-parents an ACTIVE project under the organization or an active folder.
func (*InMemoryBackend) OrganizationName ¶
func (b *InMemoryBackend) OrganizationName() string
OrganizationName is the resource name of the emulated organization.
func (*InMemoryBackend) ProjectIDs ¶
func (b *InMemoryBackend) ProjectIDs() []string
ProjectIDs lists the ids of the projects that are not DELETE_REQUESTED, sorted.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads a snapshot, replacing all state; the organization stays as configured.
func (*InMemoryBackend) SearchFolders ¶
func (b *InMemoryBackend) SearchFolders(in *resourcemanagerpb.SearchFoldersRequest) ( *resourcemanagerpb.SearchFoldersResponse, error, )
SearchFolders returns the folders matching the query; ACTIVE ones unless the query names a state.
func (*InMemoryBackend) SearchOrganizations ¶
func (b *InMemoryBackend) SearchOrganizations(in *resourcemanagerpb.SearchOrganizationsRequest) ( *resourcemanagerpb.SearchOrganizationsResponse, error, )
SearchOrganizations returns the organization when it matches the query (domain or directoryCustomerId).
func (*InMemoryBackend) SearchProjects ¶
func (b *InMemoryBackend) SearchProjects(in *resourcemanagerpb.SearchProjectsRequest) ( *resourcemanagerpb.SearchProjectsResponse, error, )
SearchProjects returns the projects matching any term of the query; ACTIVE ones unless the query names a state.
func (*InMemoryBackend) SetBillingAccount ¶
func (b *InMemoryBackend) SetBillingAccount(ref, account string) (billingInfo, error)
SetBillingAccount links a project to a billing account, or unlinks it when account is empty. Billing accounts are not modelled, so any well-formed name is accepted.
func (*InMemoryBackend) SetClock ¶
func (b *InMemoryBackend) SetClock(now func() time.Time)
SetClock replaces the clock timestamps and the deletion retention derive from.
func (*InMemoryBackend) SetIamPolicy ¶
func (b *InMemoryBackend) SetIamPolicy(in *iampb.SetIamPolicyRequest) (*iampb.Policy, error)
SetIamPolicy replaces a policy; a stale etag aborts the call.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises projects, folders, tags, enabled services, IAM policies and operations.
func (*InMemoryBackend) TestIamPermissions ¶
func (b *InMemoryBackend) TestIamPermissions(in *iampb.TestIamPermissionsRequest) ( *iampb.TestIamPermissionsResponse, error, )
TestIamPermissions reports every requested permission as granted: the emulator authorises all callers.
func (*InMemoryBackend) UndeleteFolder ¶
func (b *InMemoryBackend) UndeleteFolder(in *resourcemanagerpb.UndeleteFolderRequest) ( *longrunningpb.Operation, error, )
UndeleteFolder restores a DELETE_REQUESTED folder; an ACTIVE folder is a no-op success.
func (*InMemoryBackend) UndeleteProject ¶
func (b *InMemoryBackend) UndeleteProject(in *resourcemanagerpb.UndeleteProjectRequest) ( *longrunningpb.Operation, error, )
UndeleteProject restores a DELETE_REQUESTED project.
func (*InMemoryBackend) UpdateFolder ¶
func (b *InMemoryBackend) UpdateFolder(in *resourcemanagerpb.UpdateFolderRequest) (*longrunningpb.Operation, error)
UpdateFolder renames an ACTIVE folder.
func (*InMemoryBackend) UpdateProject ¶
func (b *InMemoryBackend) UpdateProject(in *resourcemanagerpb.UpdateProjectRequest) (*longrunningpb.Operation, error)
UpdateProject changes the display name and labels of an ACTIVE project.
func (*InMemoryBackend) UpdateTagKey ¶
func (b *InMemoryBackend) UpdateTagKey(in *resourcemanagerpb.UpdateTagKeyRequest) (*longrunningpb.Operation, error)
UpdateTagKey changes a tag key's description.
func (*InMemoryBackend) UpdateTagValue ¶
func (b *InMemoryBackend) UpdateTagValue(in *resourcemanagerpb.UpdateTagValueRequest) ( *longrunningpb.Operation, error, )
UpdateTagValue changes a tag value's description.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Resource Manager and Service Usage. It serves gRPC and REST on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init creates the backend and handler; the port is bound in StartWorker.
type Settings ¶
type Settings struct {
OrganizationID string `` //nolint:lll // config struct tags are intentionally verbose
/* 188-byte string literal not displayed */
Domain string `` //nolint:lll // config struct tags are intentionally verbose
/* 176-byte string literal not displayed */
SeedProjects string `` //nolint:lll // config struct tags are intentionally verbose
/* 244-byte string literal not displayed */
DeleteRetention time.Duration `` //nolint:lll // config struct tags are intentionally verbose
/* 264-byte string literal not displayed */
Port int `` //nolint:lll // config struct tags are intentionally verbose
/* 252-byte string literal not displayed */
}
Settings holds service-level configuration, embedded in the root CLI command as CLI.GCPResourceManager.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns the settings used when no ConfigProvider is available.