Documentation ¶
Index ¶
- func Sync(cr CloudResource) error
- type CloudResource
- type CsPlugins
- type CsRegistries
- func (rs *CsRegistries) Cache() []containershipv3.RegistrySpec
- func (cr CsRegistries) Endpoint() string
- func (rs *CsRegistries) GetAuthToken(spec containershipv3.RegistrySpec) (containershipv3.AuthTokenDef, error)
- func (rs *CsRegistries) IsEqual(specObj interface{}, parentSpecObj interface{}) (bool, error)
- func (rs *CsRegistries) UnmarshalToCache(bytes []byte) error
- type CsUsers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sync ¶
func Sync(cr CloudResource) error
Sync makes a request to cloud api for a resource and then writes the response to the resources cache
Types ¶
type CloudResource ¶
type CloudResource interface { // Endpoint returns the API endpoint associated with this cloud resource Endpoint() string // UnmarshalToCache unmarshals to the resource's underlying cache // TODO use stream not []byte for efficiency UnmarshalToCache(bytes []byte) error // IsEqual compares a spec to it's parent object spec IsEqual(spec interface{}, parentSpecObj interface{}) (bool, error) }
CloudResource defines an interface for resources to adhere to in order to be kept in sync with Containership Cloud
type CsPlugins ¶
type CsPlugins struct {
// contains filtered or unexported fields
}
CsPlugins defines the Containership Cloud Plugins resource
func (*CsPlugins) Cache ¶
func (us *CsPlugins) Cache() []containershipv3.PluginSpec
Cache return the containership plugins cache
func (*CsPlugins) UnmarshalToCache ¶
UnmarshalToCache take the json returned from containership api and writes it to CsPlugins cache
type CsRegistries ¶
type CsRegistries struct {
// contains filtered or unexported fields
}
CsRegistries defines the Containership Cloud CsRegistries resource
func NewCsRegistries ¶
func NewCsRegistries() *CsRegistries
NewCsRegistries constructs a new CsRegistries
func (*CsRegistries) Cache ¶
func (rs *CsRegistries) Cache() []containershipv3.RegistrySpec
Cache returns CsRegistries cache
func (*CsRegistries) GetAuthToken ¶
func (rs *CsRegistries) GetAuthToken(spec containershipv3.RegistrySpec) (containershipv3.AuthTokenDef, error)
GetAuthToken return the AuthToken Generated by the registry generator
func (*CsRegistries) IsEqual ¶
func (rs *CsRegistries) IsEqual(specObj interface{}, parentSpecObj interface{}) (bool, error)
IsEqual take a Registry Spec and compares it to a Registry to see if they are the same, returns an error if the objects are of the inforect type
func (*CsRegistries) UnmarshalToCache ¶
func (rs *CsRegistries) UnmarshalToCache(bytes []byte) error
UnmarshalToCache take the json returned from containership api and writes it to CsRegistries cache
type CsUsers ¶
type CsUsers struct {
// contains filtered or unexported fields
}
CsUsers defines the Containership Cloud Users resource
func (*CsUsers) Cache ¶
func (us *CsUsers) Cache() []containershipv3.UserSpec
Cache return the containership users cache
func (*CsUsers) UnmarshalToCache ¶
UnmarshalToCache take the json returned from containership api and writes it to CsUsers cache