Documentation
¶
Overview ¶
Package appconfig provides a basic emulation of AWS AppConfig.
Control plane implemented operations: CreateApplication, GetApplication, ListApplications, DeleteApplication, CreateEnvironment, GetEnvironment, ListEnvironments, DeleteEnvironment, CreateConfigurationProfile, GetConfigurationProfile, ListConfigurationProfiles, DeleteConfigurationProfile, CreateHostedConfigurationVersion, GetHostedConfigurationVersion, ListHostedConfigurationVersions, DeleteHostedConfigurationVersion.
Data-plane operations (StartConfigurationSession, GetLatestConfiguration) are implemented in the sibling appconfigdata package.
Index ¶
- type Application
- type ConfigurationProfile
- type Environment
- type HostedConfigurationVersion
- type Service
- func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)
- func (s *Service) GetHostedConfigVersionByNum(ctx context.Context, appID, profID string, version int) (*HostedConfigurationVersion, bool)
- func (s *Service) LatestVersionNumber(ctx context.Context, appID, profID string) (int, error)
- func (s *Service) Name() string
- func (s *Service) Operations() []op.Operation
- func (s *Service) RegisterRoutes(r chi.Router)
- func (s *Service) ResolveApplication(ctx context.Context, identifier string) (*Application, bool)
- func (s *Service) ResolveEnvironment(ctx context.Context, appID, identifier string) (*Environment, bool)
- func (s *Service) ResolveProfile(ctx context.Context, appID, identifier string) (*ConfigurationProfile, bool)
- func (s *Service) SupportedProtocols() []codec.Codec
- func (s *Service) TargetPrefix() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
ID string `json:"Id"`
Name string `json:"Name"`
Description string `json:"Description,omitempty"`
}
Application represents an AppConfig application.
type ConfigurationProfile ¶
type ConfigurationProfile struct {
ApplicationId string `json:"ApplicationId"`
ID string `json:"Id"`
Name string `json:"Name"`
LocationUri string `json:"LocationUri,omitempty"`
Type string `json:"Type,omitempty"`
}
ConfigurationProfile represents an AppConfig configuration profile.
type Environment ¶
type Environment struct {
ApplicationId string `json:"ApplicationId"`
ID string `json:"Id"`
Name string `json:"Name"`
Description string `json:"Description,omitempty"`
State string `json:"State"`
}
Environment represents an AppConfig environment.
type HostedConfigurationVersion ¶
type HostedConfigurationVersion struct {
ApplicationId string `json:"ApplicationId"`
ConfigurationProfileId string `json:"ConfigurationProfileId"`
VersionNumber int `json:"VersionNumber"`
ContentType string `json:"ContentType"`
Description string `json:"Description,omitempty"`
Content string `json:"Content"` // raw bytes stored as a string
}
HostedConfigurationVersion represents a stored configuration payload.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements router.Service for AppConfig.
func (*Service) GetHostedConfigVersionByNum ¶
func (s *Service) GetHostedConfigVersionByNum(ctx context.Context, appID, profID string, version int) (*HostedConfigurationVersion, bool)
GetHostedConfigVersionByNum retrieves a specific hosted config version.
func (*Service) LatestVersionNumber ¶
LatestVersionNumber returns the latest hosted config version number for a profile (0 = none).
func (*Service) Operations ¶
func (*Service) RegisterRoutes ¶
RegisterRoutes registers the REST endpoints for AppConfig.
func (*Service) ResolveApplication ¶
ResolveApplication finds an application by ID or name. Returns (app, true) or (nil, false).
func (*Service) ResolveEnvironment ¶
func (s *Service) ResolveEnvironment(ctx context.Context, appID, identifier string) (*Environment, bool)
ResolveEnvironment finds an environment by ID or name within the given app.
func (*Service) ResolveProfile ¶
func (s *Service) ResolveProfile(ctx context.Context, appID, identifier string) (*ConfigurationProfile, bool)
ResolveProfile finds a configuration profile by ID or name within the given app.