Documentation ¶
Index ¶
- type CloudAccount
- type Credentials
- type Handler
- func (e *Handler) Create(rw http.ResponseWriter, r *http.Request)
- func (e *Handler) Delete(rw http.ResponseWriter, r *http.Request)
- func (e *Handler) Get(rw http.ResponseWriter, r *http.Request)
- func (e *Handler) ListAll(rw http.ResponseWriter, r *http.Request)
- func (e *Handler) Update(rw http.ResponseWriter, r *http.Request)
- type Service
- func (s *Service) Create(ctx context.Context, account *CloudAccount) error
- func (s *Service) Delete(ctx context.Context, accountName string) error
- func (s *Service) Get(ctx context.Context, accountName string) (*CloudAccount, error)
- func (s *Service) GetAll(ctx context.Context) ([]CloudAccount, error)
- func (s *Service) Update(ctx context.Context, account *CloudAccount) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudAccount ¶
type CloudAccount struct { Name string `json:"name" valid:"required, length(1|32)"` Provider provider.Name `json:"provider" valid:"in(aws|digitalocean|packet|gce|openstack)"` Credentials Credentials `json:"credentials" valid:"optional"` }
CloudAccount is settings of account in public or private cloud (e.g. AWS, vCenter) Name should be unique.
type Credentials ¶
Credentials store ssh keys, fingerprints and other creds associated with CloudAccount
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a http controller for account entity
func (*Handler) Create ¶
func (e *Handler) Create(rw http.ResponseWriter, r *http.Request)
Create register new cloud account
func (*Handler) Delete ¶
func (e *Handler) Delete(rw http.ResponseWriter, r *http.Request)
Delete cloud account
func (*Handler) Get ¶
func (e *Handler) Get(rw http.ResponseWriter, r *http.Request)
Get retrieves individual account by name
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service holds all business logic related to cloud accounts
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, account *CloudAccount) error
Create stores user in the underlying storage
Click to show internal directories.
Click to hide internal directories.