Documentation ¶
Index ¶
- func DelBuild(c context.Context, build *resource.Build) error
- func GetBuild(c context.Context, name, version, channel, sdk string) (*resource.Build, error)
- func GetBuildLatest(c context.Context, name, version, channel string) (*resource.Build, error)
- func GetChannel(c context.Context, channel string) (*resource.Channel, error)
- func GetFeed(c context.Context) ([]*resource.Build, error)
- func NewContext(parent context.Context, ds Datastore) context.Context
- func PostBuild(c context.Context, build *resource.Build) error
- func PutBuild(c context.Context, build *resource.Build) error
- type Datastore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBuild ¶
GetBuild retrieves a specific build from the database for the matching version ID, channel and SDK.
func GetBuildLatest ¶ added in v0.0.2
GetBuildLatest retrieves a specified build from the database for the matching version and channel, for the latest SDK.
func GetChannel ¶
GetChannel retrieves the latest SDK version in the system for the specified channel.
func NewContext ¶
NewContext returns a Context whose Value method returns the application's data storage objects.
Types ¶
type Datastore ¶
type Datastore interface { // GetFeed retrieves a list of recent builds. GetFeed() ([]*resource.Build, error) // GetChannel retrieves the latest SDK version in // the system for the specified channel. GetChannel(channel string) (*resource.Channel, error) // GetBuild retrieves a specific build from the // database for the matching version ID, channel and SDK. GetBuild(name, version, channel, sdk string) (*resource.Build, error) // GetBuildLatest retrieves a specified build from // the database for the matching version and channel, // for the latest SDK. GetBuildLatest(name, version, channel string) (*resource.Build, error) // PostBuild saves a Build in the datastore. PostBuild(build *resource.Build) error // PutBuild saves a Build in the datastore. PutBuild(build *resource.Build) error // DelBuild deletes a Build in the datastore. DelBuild(build *resource.Build) error }
func FromContext ¶
FromContext returns the sql.DB associated with this context.
Click to show internal directories.
Click to hide internal directories.