Documentation ¶
Index ¶
- func CreateHTTPClient(config *core.Remote) (*http.Client, error)
- type FormatURLSchema
- func (schema *FormatURLSchema) Create(name string) string
- func (schema *FormatURLSchema) Get(name string) string
- func (schema *FormatURLSchema) GetAll() string
- func (schema *FormatURLSchema) GetVersion(name string, version string) string
- func (schema *FormatURLSchema) GetVersionsOf(name string) string
- type Registry
- type URLSchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FormatURLSchema ¶
type FormatURLSchema struct { Endpoint string CreateFormat string GetFormat string GetVersionFormat string GetAllFormat string GetVersionsOfFormat string }
FormatURLSchema allows the definition of the url schema with string formats. Each format gets the base url plus the the function arguments as format parameters.
func (*FormatURLSchema) Create ¶
func (schema *FormatURLSchema) Create(name string) string
Create returns the url for pushing dogu.json files to the backend
func (*FormatURLSchema) Get ¶
func (schema *FormatURLSchema) Get(name string) string
Get returns the url for the latest version of the dogu
func (*FormatURLSchema) GetAll ¶
func (schema *FormatURLSchema) GetAll() string
GetAll returns the url for fetching all dogu descriptors
func (*FormatURLSchema) GetVersion ¶
func (schema *FormatURLSchema) GetVersion(name string, version string) string
GetVersion returns the url for one specific version of the dogu.json
func (*FormatURLSchema) GetVersionsOf ¶
func (schema *FormatURLSchema) GetVersionsOf(name string) string
GetVersionsOf returns the url for fetching all versions of a dogu
type Registry ¶
type Registry interface { // Create the dogu on the remote server. Create(dogu *core.Dogu) error // Get returns the detail about a dogu from the remote server. Get(name string) (*core.Dogu, error) // GetVersion returns a version specific detail about the dogu. Name is mandatory. Version is optional; if no version // is given then the newest version will be returned. GetVersion(name, version string) (*core.Dogu, error) // GetAll returns all dogus from the remote server. GetAll() ([]*core.Dogu, error) // GetVersionsOf return all versions of a dogu. GetVersionsOf(name string) ([]core.Version, error) // SetUseCache disables or enables the caching for the remote registry. SetUseCache(useCache bool) // Delete removes a specific dogu descriptor from the dogu registry. Delete(dogu *core.Dogu) error }
Registry is able to manage the remote dogu registry.
type URLSchema ¶
type URLSchema interface { // Create returns the url for pushing dogu.json files to the backend Create(name string) string // Get returns the url for the latest version of the dogu Get(name string) string // GetVersion returns the url for one specific version of the dogu.json GetVersion(name string, version string) string // GetAll returns the url for fetching all dogu descriptors GetAll() string // GetVersionsOf returns the url for fetching all versions of a dogu GetVersionsOf(name string) string }
URLSchema creates the url for the remote backend
func NewDefaultURLSchema ¶
NewDefaultURLSchema returns the url schema of the active backend.
func NewIndexURLSchema ¶
NewIndexURLSchema returns the url schema which is required if the dogu descriptors are mirrored to a webserver.
func NewURLSchemaByName ¶
NewURLSchemaByName returns the url schema for the given name or nil if no url schema exists with this name.