Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMappingExists = errors.New("app ID mapping already exists") ErrMappingNotFound = errors.New("app ID mapping not found") )
View Source
var ( ErrExists = errors.New("app index already exists") ErrNotFound = errors.New("app not found") )
View Source
var (
ErrURLNotSet = errors.New("requested URL not set")
)
Functions ¶
func IsValidAppID ¶
IsValidAppID returns whether or not the provided string is a valid app ID.
Types ¶
type ConfigStore ¶
type ConfigStore interface {
// Add adds an app's config to the store.
//
// Returns ErrExists if the specified app index already exists in the store.
Add(ctx context.Context, appIndex uint16, config *Config) error
// Get gets an app's config by app index
//
// Returns ErrNotFound if it could not be found.
Get(ctx context.Context, appIndex uint16) (*Config, error)
}
type Mapper ¶
type Mapper interface {
// Add adds a mapping between an app ID and an app index.
//
// Returns ErrMappingNotExists if a mapping with the specified app ID already exists in the store.
Add(ctx context.Context, appID string, appIndex uint16) error
// GetAppIndex gets the app index given an app ID.
//
// Returns ErrMappingNotFound if no mapping with the specified app ID was found.
GetAppIndex(ctx context.Context, appID string) (appIndex uint16, err error)
}
Click to show internal directories.
Click to hide internal directories.