Documentation
¶
Overview ¶
Package provider contains target-platform adapters. It never owns Pack rules, plan lifecycle, or HTTP presentation.
Index ¶
- Variables
- func CredentialErrorMessage(err error) string
- func CredentialPathDisplay(credentialsPath string) string
- func LoadCredentialReference(workspace, environmentID string) (string, error)
- func SafeError(err error) error
- func SaveCredentialReference(workspace, environmentID, credentialsPath string) error
- func ValidateFirebaseServiceAccount(credentialsPath string) error
- type Adapter
- type Capabilities
- type CredentialValidationError
- type Firebase
- func (f *Firebase) Capabilities() Capabilities
- func (f *Firebase) Connect(ctx context.Context) error
- func (f *Firebase) ListVersions(ctx context.Context) ([]Version, error)
- func (f *Firebase) Publish(ctx context.Context, input []byte, expectedETag string) (Template, error)
- func (f *Firebase) Pull(ctx context.Context) (Template, error)
- func (f *Firebase) PullVersion(ctx context.Context, version string) (Template, error)
- func (f *Firebase) Status(context.Context) Status
- func (f *Firebase) String() string
- func (f *Firebase) Validate(ctx context.Context, input []byte) error
- type FirebaseConfig
- type Publisher
- type Status
- type Template
- type Version
- type VersionReader
Constants ¶
This section is empty.
Variables ¶
var ( ErrCredentialFileMissing = errors.New("credential file is missing") ErrCredentialFileUnreadable = errors.New("credential file is unreadable") ErrCredentialJSONInvalid = errors.New("credential file is not valid JSON") ErrCredentialServiceAccount = errors.New("credential file is not a Firebase service account") ErrCredentialFieldsMissing = errors.New("credential file is missing required fields") )
Functions ¶
func CredentialErrorMessage ¶
CredentialErrorMessage is suitable for the CLI. The server must use its own stable, path-free response messages when rendering browser errors.
func CredentialPathDisplay ¶
CredentialPathDisplay intentionally reveals only the final file name.
func LoadCredentialReference ¶
LoadCredentialReference reads only a filesystem reference. The service account JSON itself remains outside the workspace and is never copied here.
func SaveCredentialReference ¶
SaveCredentialReference stores a local path reference under .conflow, which is ignored by Git. It never copies service account JSON into the workspace.
func ValidateFirebaseServiceAccount ¶
ValidateFirebaseServiceAccount verifies that a local path can be used by Firebase without retaining or returning the credential's private contents.
Types ¶
type Adapter ¶
type Adapter interface {
Connect(context.Context) error
Status(context.Context) Status
Pull(context.Context) (Template, error)
Validate(context.Context, []byte) error
Capabilities() Capabilities
}
Adapter owns only provider protocol calls. Credentials are represented by a local reference and are never returned by this interface.
type Capabilities ¶
type CredentialValidationError ¶
CredentialValidationError retains only local validation metadata. It never carries JSON content, so callers cannot accidentally echo a private key.
func (*CredentialValidationError) Error ¶
func (e *CredentialValidationError) Error() string
func (*CredentialValidationError) Unwrap ¶
func (e *CredentialValidationError) Unwrap() error
type Firebase ¶
type Firebase struct {
// contains filtered or unexported fields
}
func NewFirebase ¶
func NewFirebase(config FirebaseConfig) *Firebase
func (*Firebase) Capabilities ¶
func (f *Firebase) Capabilities() Capabilities
func (*Firebase) ListVersions ¶
ListVersions is intentionally metadata-only. The Remote Config REST API has no secret-bearing version endpoint; this query is safe to expose only through application orchestration.
func (*Firebase) Publish ¶
func (f *Firebase) Publish(ctx context.Context, input []byte, expectedETag string) (Template, error)
Publish performs the only destructive Firebase operation. The caller must have already compared the current ETag; If-Match closes the race afterwards.
func (*Firebase) PullVersion ¶
PullVersion performs a read-only fetch of a historical Firebase template. Firebase accepts the version selector on the same Remote Config resource.
type FirebaseConfig ¶
type Publisher ¶
Publisher is deliberately separate from Adapter so read-only test doubles and future providers do not accidentally advertise a destructive capability.
type Status ¶
type Status struct {
Status string
Capabilities Capabilities
}
type Version ¶
type Version struct {
Version string `json:"version"`
CreatedAt time.Time `json:"created_at"`
Description string `json:"description,omitempty"`
}
Version is a metadata-only historical Firebase Remote Config version. It deliberately contains no template values.
type VersionReader ¶
type VersionReader interface {
Adapter
ListVersions(context.Context) ([]Version, error)
PullVersion(context.Context, string) (Template, error)
}
VersionReader is optional because rollback can use the protected release snapshot, while provider implementations may additionally expose historical platform versions without granting mutation authority.