Documentation ¶
Overview ¶
Package services has the service models for storing the datastore service info
Index ¶
- Constants
- type Service
- func (s *Service) AddDataset(conn *gorm.DB) error
- func (s *Service) Create(conn *gorm.DB) error
- func (s Service) Datastore() (toolkit.Datastore, error)
- func (s *Service) Delete(conn *gorm.DB) error
- func (s *Service) Get(conn *gorm.DB) error
- func (s *Service) RemoveDataset(conn *gorm.DB) error
- func (s *Service) Update(conn *gorm.DB) error
- func (s Service) Validate() error
Constants ¶
View Source
const (
//POSTGRES represents the postgres type of datastore service
POSTGRES = "POSTGRES"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { gorm.Model //URL at which the service is available URL string //Port is the port at which the datastore service is available Port string //Username for authentication with the datastore service Username string //Password for authentication with the datastore service Password string //Name is the name of the datastore db Name string //Group to which the datastore belongs to classify the service Group string //Datasets has the number of datasets stored in the database Datasets int //DatastoreType indicates the type of datastore like postgres etc DatastoreType string //DataDirectory is the directory where the data is stored DataDirectory string }
Service is defnition of the datastore service
func (*Service) AddDataset ¶
AddDataset will add 1 to the datasets count of the service
func (Service) Datastore ¶
Datastore returns the datastore associated with a service. It iwll return nil and boolean as false if the service doesn't represent a correct datastore
func (*Service) RemoveDataset ¶
RemoveDataset will remove 1 from the datasets count of the service
Click to show internal directories.
Click to hide internal directories.