Documentation
¶
Index ¶
- func DeleteBinding(binding Binding, store stores.Store) error
- func ExistsWithAuthID(authID string, serviceUUID string, host string, authType string, ...) error
- func ExistsWithName(name string, store stores.Store) error
- type Binding
- func CreateBinding(binding Binding, store stores.Store) (Binding, error)
- func FindBindingByAuthID(authID string, serviceUUID string, host string, authType string, ...) (Binding, error)
- func FindBindingByUUIDAndName(uuid, name string, store stores.Store) (Binding, error)
- func UpdateBinding(original Binding, tempBind TempUpdateBinding, store stores.Store) (Binding, error)
- type BindingList
- type TempUpdateBinding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteBinding ¶
DeleteBinding deletes the given binding from the store
Types ¶
type Binding ¶
type Binding struct {
Name string `json:"name" required:"true"`
ServiceUUID string `json:"service_uuid" required:"true"`
Host string `json:"host" required:"true"`
UUID string `json:"uuid"`
AuthIdentifier string `json:"auth_identifier" required:"true"`
UniqueKey string `json:"unique_key" required:"true"`
AuthType string `json:"auth_type" required:"true"`
CreatedOn string `json:"created_on,omitempty"`
LastAuth string `json:"last_auth,omitempty"`
}
func CreateBinding ¶
CreateBinding creates a new binding after validating its context
func FindBindingByAuthID ¶
func FindBindingByAuthID(authID string, serviceUUID string, host string, authType string, store stores.Store) (Binding, error)
FindBindingByAuthID queries the datastore and returns a binding based on the given auth identifier, service and host
func FindBindingByUUIDAndName ¶
FindBindingByUUIDAndName returns the binding associated with the provided uuid and/or name
func UpdateBinding ¶
func UpdateBinding(original Binding, tempBind TempUpdateBinding, store stores.Store) (Binding, error)
UpdateBinding updates a binding after validating its fields
type BindingList ¶
type BindingList struct {
Bindings []Binding `json:"bindings"`
}
func FindAllBindings ¶
func FindAllBindings(store stores.Store) (BindingList, error)
FindAllBindings returns all the bindings in the service
func FindBindingsByServiceTypeAndHost ¶
func FindBindingsByServiceTypeAndHost(serviceUUID string, host string, store stores.Store) (BindingList, error)
FindBindingsByServiceTypeAndHost returns all the bindings of a specific service type and host
type TempUpdateBinding ¶
type TempUpdateBinding struct {
Name string `json:"name"`
ServiceUUID string `json:"service_uuid"`
Host string `json:"host"`
AuthIdentifier string `json:"auth_identifier"`
AuthType string `json:"auth_type"`
UniqueKey string `json:"unique_key"`
}
TempUpdateBinding is a struct to be used as an intermediate node when updating a binding containing only the `allowed to be updated fields`