Documentation
¶
Index ¶
- type BoltEnvironmentRepository
- type BoltInstanceRepository
- func (r *BoltInstanceRepository) Delete(id string) error
- func (r *BoltInstanceRepository) FindAll() ([]Instance, error)
- func (r *BoltInstanceRepository) FindByIPAddress(IPAddress string) (*Instance, error)
- func (r *BoltInstanceRepository) FindByMACAddress(MACAddress string) (*Instance, error)
- func (r *BoltInstanceRepository) FindOne(id string) (*Instance, error)
- func (r *BoltInstanceRepository) Save(item *Instance) (*Instance, error)
- type CloudInitData
- type CloudInitService
- type CloudInitServiceImpl
- type Environment
- type EnvironmentRepository
- type EnvironmentService
- type EnvironmentServiceImpl
- type Instance
- type InstanceRepository
- type InstanceService
- type InstanceServiceImpl
- func (c *InstanceServiceImpl) Create(item *Instance) (*Instance, error)
- func (c *InstanceServiceImpl) Delete(id string) error
- func (c *InstanceServiceImpl) FindAll() ([]Instance, error)
- func (c *InstanceServiceImpl) FindByIPForUserAgent(ipAddress, userAgent string) (*Instance, error)
- func (c *InstanceServiceImpl) FindOne(id string) (*Instance, error)
- func (c *InstanceServiceImpl) Update(id string, newItem *Instance) (*Instance, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltEnvironmentRepository ¶ added in v0.2.0
type BoltEnvironmentRepository struct {
// contains filtered or unexported fields
}
func NewEnvironmentRepository ¶ added in v0.2.0
func NewEnvironmentRepository(db *bolt.DB) *BoltEnvironmentRepository
func (*BoltEnvironmentRepository) Get ¶ added in v0.2.0
func (r *BoltEnvironmentRepository) Get() (*Environment, error)
func (*BoltEnvironmentRepository) Save ¶ added in v0.2.0
func (r *BoltEnvironmentRepository) Save(item *Environment) (*Environment, error)
type BoltInstanceRepository ¶
type BoltInstanceRepository struct {
// contains filtered or unexported fields
}
func NewInstanceRepository ¶
func NewInstanceRepository(db *bolt.DB) *BoltInstanceRepository
func (*BoltInstanceRepository) Delete ¶
func (r *BoltInstanceRepository) Delete(id string) error
func (*BoltInstanceRepository) FindAll ¶
func (r *BoltInstanceRepository) FindAll() ([]Instance, error)
func (*BoltInstanceRepository) FindByIPAddress ¶
func (r *BoltInstanceRepository) FindByIPAddress(IPAddress string) (*Instance, error)
func (*BoltInstanceRepository) FindByMACAddress ¶
func (r *BoltInstanceRepository) FindByMACAddress(MACAddress string) (*Instance, error)
type CloudInitData ¶ added in v0.2.0
type CloudInitService ¶ added in v0.2.0
type CloudInitService interface {
PreviewCloudInitData(userDataTemplate, metaDataTemplate string) (*CloudInitData, error)
GetCloudInitDataForClient(ipAddress, userAgent string) (*CloudInitData, error)
}
type CloudInitServiceImpl ¶ added in v0.2.0
type CloudInitServiceImpl struct {
InstanceService InstanceService
EnvironmentService EnvironmentService
}
func NewCloudInitService ¶ added in v0.2.0
func NewCloudInitService(instanceService InstanceService, environmentService EnvironmentService) *CloudInitServiceImpl
func (*CloudInitServiceImpl) GetCloudInitDataForClient ¶ added in v0.2.0
func (c *CloudInitServiceImpl) GetCloudInitDataForClient(ipAddress, userAgent string) (*CloudInitData, error)
func (*CloudInitServiceImpl) PreviewCloudInitData ¶ added in v0.2.0
func (c *CloudInitServiceImpl) PreviewCloudInitData(userDataTemplate, metaDataTemplate string) (*CloudInitData, error)
type Environment ¶ added in v0.2.0
type EnvironmentRepository ¶ added in v0.2.0
type EnvironmentRepository interface {
Get() (*Environment, error)
Save(item *Environment) (*Environment, error)
}
type EnvironmentService ¶ added in v0.2.0
type EnvironmentService interface {
GetEnvironment() (*Environment, error)
Update(newItem *Environment) (*Environment, error)
}
type EnvironmentServiceImpl ¶ added in v0.2.0
type EnvironmentServiceImpl struct {
Repository EnvironmentRepository
}
func NewEnvironmentService ¶ added in v0.2.0
func NewEnvironmentService(repository EnvironmentRepository, validator *validator.Validate) *EnvironmentServiceImpl
func (*EnvironmentServiceImpl) GetEnvironment ¶ added in v0.2.0
func (c *EnvironmentServiceImpl) GetEnvironment() (*Environment, error)
func (*EnvironmentServiceImpl) Update ¶ added in v0.2.0
func (c *EnvironmentServiceImpl) Update(newItem *Environment) (*Environment, error)
type Instance ¶
type Instance struct {
ID bson.ObjectId `json:"id"`
Name string `json:"name" validate:"required"`
IPAddress string `json:"ipAddress" validate:"required,ip,uniqueIP"`
MACAddress string `json:"macAddress" validate:"required,mac,uniqueMAC"`
UserData string `json:"userData"`
MetaData string `json:"metaData"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
RequestedAt time.Time `json:"requestedAt"`
RequestedBy string `json:"requestedBy"`
}
type InstanceRepository ¶
type InstanceService ¶
type InstanceServiceImpl ¶
type InstanceServiceImpl struct {
Repository InstanceRepository
EnvironmentService EnvironmentService
}
func NewInstanceService ¶
func NewInstanceService(repository InstanceRepository, validator *validator.Validate) *InstanceServiceImpl
func (*InstanceServiceImpl) Create ¶
func (c *InstanceServiceImpl) Create(item *Instance) (*Instance, error)
func (*InstanceServiceImpl) Delete ¶
func (c *InstanceServiceImpl) Delete(id string) error
func (*InstanceServiceImpl) FindAll ¶
func (c *InstanceServiceImpl) FindAll() ([]Instance, error)
func (*InstanceServiceImpl) FindByIPForUserAgent ¶ added in v0.2.0
func (c *InstanceServiceImpl) FindByIPForUserAgent(ipAddress, userAgent string) (*Instance, error)
Click to show internal directories.
Click to hide internal directories.