Documentation
¶
Overview ¶
Package mapsapi is the admin REST surface for the maps settings (#2068): whether maps are on and where their archives are written, the regions kept, a refresh of one, and the size a region would be before it is saved.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Service is the maps surface. nil mounts nothing.
Service Service
// BucketOf names the bucket archives go to under a settings value.
BucketOf maps.ResolvedBucket
// Author resolves the acting admin.
Author func(*http.Request) string
}
Config carries the service and the parent-owned helpers.
type Service ¶
type Service interface {
View(ctx context.Context, bucketOf maps.ResolvedBucket) (maps.View, error)
SaveSettings(ctx context.Context, in maps.SettingsInput, author string) error
AddRegion(ctx context.Context, in maps.RegionInput, author string) (*maps.Region, error)
RefreshRegion(ctx context.Context, id string) (*maps.Region, error)
DeleteRegion(ctx context.Context, id string) error
Estimate(ctx context.Context, in maps.EstimateInput) (maps.Estimate, error)
}
Service is what the routes act through. *maps.Service satisfies it.
Click to show internal directories.
Click to hide internal directories.