Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceRepr ¶
func ParseServiceRepr ¶
func ParseServiceRepr(body []byte, path string) (repr ServiceRepr, err error)
ParseServiceRepr attempts parse using each of the ReprParsers in turn. Returns the first result to not error, or the error from the last parser
func ParseV1ServiceRepr ¶
func ParseV1ServiceRepr(body []byte, path string) (repr ServiceRepr, err error)
func ParseV2ServiceRepr ¶
func ParseV2ServiceRepr(body []byte, path string) (ServiceRepr, error)
type Storage ¶
type Storage interface { All() ([]Service, error) Upsert(service Service) error Delete(serviceId string) error }
The storage primitives required by Bamboo from the storage backend
type V1ServiceRepr ¶
func (*V1ServiceRepr) Serialize ¶
func (v1 *V1ServiceRepr) Serialize() ([]byte, error)
func (*V1ServiceRepr) Service ¶
func (v1 *V1ServiceRepr) Service() Service
type V2ServiceRepr ¶
type V2ServiceRepr struct { ID string `json:"-"` Version string `json:"version"` // 2 is only valid version for V2ServiceRepr Config map[string]string `json:"config"` }
func MakeV2ServiceRepr ¶
func MakeV2ServiceRepr(service Service) *V2ServiceRepr
func NewV2ServiceRepr ¶
func NewV2ServiceRepr(appID string, config map[string]string) *V2ServiceRepr
func (*V2ServiceRepr) Serialize ¶
func (v2 *V2ServiceRepr) Serialize() ([]byte, error)
func (*V2ServiceRepr) Service ¶
func (v2 *V2ServiceRepr) Service() Service
Click to show internal directories.
Click to hide internal directories.