Documentation ¶
Overview ¶
Package iface defines an interface for accessing AppEngine APIs. This is helpful for creating testable packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppAPI ¶
type AppAPI interface { ServicesPages(ctx context.Context, f func(listVer *appengine.ListServicesResponse) error) error VersionsPages(ctx context.Context, serviceID string, f func(listVer *appengine.ListVersionsResponse) error) error InstancesPages(ctx context.Context, serviceID, versionID string, f func(listInst *appengine.ListInstancesResponse) error) error }
AppAPI defines the interface used by the aeflex logic.
type AppAPIImpl ¶
type AppAPIImpl struct {
// contains filtered or unexported fields
}
AppAPIImpl implements the AppAPI interface.
func NewAppAPI ¶
func NewAppAPI(project string, apis *appengine.APIService) *AppAPIImpl
NewAppAPI creates a new instance of the AppAPI for the given project.
func (*AppAPIImpl) InstancesPages ¶
func (a *AppAPIImpl) InstancesPages( ctx context.Context, serviceID, versionID string, f func(listInst *appengine.ListInstancesResponse) error) error
InstancesPages lists all AppEngine instances for the given service and version and calls the given function for each "page" of results.
func (*AppAPIImpl) ServicesPages ¶
func (a *AppAPIImpl) ServicesPages( ctx context.Context, f func(listVer *appengine.ListServicesResponse) error) error
ServicesPages lists all AppEngine services and calls the given function for each "page" of results.
func (*AppAPIImpl) VersionsPages ¶
func (a *AppAPIImpl) VersionsPages( ctx context.Context, serviceID string, f func(listVer *appengine.ListVersionsResponse) error) error
VersionsPages lists all AppEngine versions for the given service and calls the given function for each "page" of results.