Documentation
¶
Index ¶
Constants ¶
View Source
const ( V4 = "v4" Legacy = "" )
Versions of the API that can be served.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(db *mgo.Database, es *elasticsearch.Database, idx string, config ServerParams, serveVersions ...string) (http.Handler, error)
NewServer returns a new handler that handles charm store requests and stores its data in the given database. The handler will serve the specified versions of the API using the given configuration.
Types ¶
type ServerParams ¶
type ServerParams struct {
// AuthUsername and AuthPassword hold the credentials
// used for HTTP basic authentication.
AuthUsername string
AuthPassword string
// IdentityLocation holds the location of the third party authorization
// service to use when creating third party caveats.
IdentityLocation string
// PublicKeyLocator holds a public key store.
// It may be nil.
PublicKeyLocator bakery.PublicKeyLocator
}
ServerParams holds configuration for a new API server.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
charmd
command
|
|
|
cshash256
command
|
|
|
essync
command
|
|
|
The config package defines configuration parameters for the charm store.
|
The config package defines configuration parameters for the charm store. |
|
The csclient package provides access to the charm store API.
|
The csclient package provides access to the charm store API. |
|
internal
|
|
|
charmstore
This is the internal version of the charmstore package.
|
This is the internal version of the charmstore package. |
|
debug
The debug package holds various functions that may be used for debugging but should not be included in production code.
|
The debug package holds various functions that may be used for debugging but should not be included in production code. |
|
legacy
The legacy package implements the legacy API, as follows:
|
The legacy package implements the legacy API, as follows: |
|
router
The router package implements an HTTP request router for charm store HTTP requests.
|
The router package implements an HTTP request router for charm store HTTP requests. |
|
The params package holds types that are a part of the charm store's external contract - they will be marshalled (or unmarshalled) as JSON and delivered through the HTTP API.
|
The params package holds types that are a part of the charm store's external contract - they will be marshalled (or unmarshalled) as JSON and delivered through the HTTP API. |
Click to show internal directories.
Click to hide internal directories.