Documentation ¶
Index ¶
- Constants
- Variables
- func Close()
- func GetDB() *gorm.DB
- func GetEnv(key, fallback string) string
- func Init()
- func StringInSlice(str string, slice []string) bool
- func ToJson(resp string) map[string]interface{}
- type Claims
- type Driver
- type ExportDatabase
- type ExportDatabaseRequest
- type ExportWorkerKafkaApi
- type ImportDeployService
- type Influx
- type InfluxImpl
- type Instance
- type Instances
- type InstancesResponse
- type LoggerMiddleWare
- type Migration
- type MigrationInfo
- type PermissionApiService
- type PipelineApiService
- type Response
- type Serving
- func (f *Serving) CreateExportDatabase(id string, req ExportDatabaseRequest, userId string) (database ExportDatabase, errs []error)
- func (f *Serving) CreateFromInstance(instance *Instance) (err error)
- func (f *Serving) CreateInstance(req ServingRequest, userId string, token string) (instance Instance, err error)
- func (f *Serving) DeleteExportDatabase(id string, userId string) (errs []error)
- func (f *Serving) DeleteInstanceForUser(id string, userId string, token string) (deleted bool, errors []error)
- func (f *Serving) DeleteInstanceWithPermHandling(id string, userId string, admin bool, token string) (deleted bool, errors []error)
- func (f *Serving) DeleteInstancesForUser(ids []string, userId string, token string) (deleted []string, errors []error)
- func (f *Serving) ExportInstanceCleanup(recheckWait time.Duration) error
- func (f *Serving) GetExportDatabase(id string, userId string) (database ExportDatabase, errs []error)
- func (f *Serving) GetExportDatabases(userId string, args map[string][]string) (databases []ExportDatabase, errs []error)
- func (f *Serving) GetInstance(id string, userId string, token string, admin bool) (instance Instance, errors []error)
- func (f *Serving) GetInstances(userId string, args map[string][]string, admin bool, token string) (instances Instances, total int64, errors []error)
- func (f *Serving) GetInstancesForUser(userId string, args map[string][]string, token string) (instances Instances, count int64, errors []error)
- func (f *Serving) UpdateExportDatabase(id string, req ExportDatabaseRequest, userId string) (database ExportDatabase, errs []error)
- func (f *Serving) UpdateInstance(id string, userId string, request ServingRequest, token string) (instance Instance, errors []error)
- type ServingRequest
- type ServingRequestValue
- type Value
Constants ¶
View Source
const ExportInstancePermissionsTopic = "export-instances"
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func StringInSlice ¶
Types ¶
type Claims ¶
type ExportDatabase ¶
type ExportDatabase struct { ID string `gorm:"primary_key;type:varchar(255);column:id"` Name string `gorm:"type:varchar(255)"` Description string `gorm:"type:varchar(255)"` Type string `gorm:"type:varchar(255)"` Deployment string `gorm:"type:varchar(255)"` Url string `gorm:"type:varchar(255)"` EwFilterTopic string `gorm:"type:varchar(255)"` UserId string `gorm:"type:varchar(255)"` Public bool `gorm:"type:bool;DEFAULT:false"` }
type ExportDatabaseRequest ¶
type ExportDatabaseRequest struct { Name string `json:"Name" validate:"required"` Description string `json:"Description"` Type string `json:"Type" validate:"required"` Deployment string `json:"deployment" validate:"required"` Url string `json:"Url" validate:"required"` EwFilterTopic string `json:"EwFilterTopic" validate:"required"` Public bool `json:"Public"` }
type ExportWorkerKafkaApi ¶
type ImportDeployService ¶
type InfluxImpl ¶ added in v0.0.2
type InfluxImpl struct {
// contains filtered or unexported fields
}
func NewInflux ¶
func NewInflux() *InfluxImpl
func (*InfluxImpl) ForceDeleteMeasurement ¶ added in v0.0.2
func (i *InfluxImpl) ForceDeleteMeasurement(id string, userId string, instance Instance) (errs []error)
type Instance ¶
type Instance struct { ID uuid.UUID `gorm:"primary_key;type:char(36);column:id"` Name string `gorm:"type:varchar(255)"` Description string `gorm:"type:varchar(255)"` EntityName string `gorm:"type:varchar(255)"` ServiceName string `gorm:"type:varchar(255)"` Topic string `gorm:"type:varchar(255)"` ApplicationId uuid.UUID `gorm:"type:char(36)"` Database string `gorm:"type:varchar(255)"` Measurement string `gorm:"type:varchar(255)"` Filter string `gorm:"type:varchar(255)"` FilterType string `gorm:"type:varchar(255)"` TimePath string `gorm:"type:varchar(255)"` TimePrecision *string `gorm:"type:varchar(255)"` UserId string `gorm:"type:varchar(255)"` Generated bool `gorm:"type:bool;DEFAULT:false"` RancherServiceId string `gorm:"type:varchar(255)"` Offset string `gorm:"type:varchar(255)"` ExportDatabaseID string `gorm:"type:varchar(255)"` ExportDatabase ExportDatabase `gorm:"association_autoupdate:false;association_autocreate:false"` TimestampFormat string `gorm:"type:varchar(255)"` Values []Value `gorm:"foreignkey:InstanceID;association_foreignkey:ID"` CreatedAt time.Time UpdatedAt time.Time }
type InstancesResponse ¶
type LoggerMiddleWare ¶
type LoggerMiddleWare struct {
// contains filtered or unexported fields
}
func (*LoggerMiddleWare) CloseLogFile ¶
func (this *LoggerMiddleWare) CloseLogFile()
func (*LoggerMiddleWare) ServeHTTP ¶
func (this *LoggerMiddleWare) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Migration ¶
type Migration struct {
// contains filtered or unexported fields
}
func NewMigration ¶
func (*Migration) TmpMigrate ¶
type MigrationInfo ¶
type MigrationInfo struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` Deployment string `json:"deployment"` Url string `json:"url"` EwFilterTopic string `json:"ew_filter_topic"` UserID string `json:"user_id"` Public bool `json:"public"` }
type PermissionApiService ¶
type PipelineApiService ¶
type Response ¶
type Response struct {
Message string `json:"message,omitempty" validate:"required"`
}
type Serving ¶
type Serving struct {
// contains filtered or unexported fields
}
func NewServing ¶
func NewServing(driver Driver, influx Influx, permissionService PermissionApiService, pipelineService PipelineApiService, importDeployService ImportDeployService, exportDatabaseIdPrefix string, permissionsV2 permV2Client.Client, cleanupChron string, cleanupRecheckWait time.Duration) (*Serving, error)
func (*Serving) CreateExportDatabase ¶
func (f *Serving) CreateExportDatabase(id string, req ExportDatabaseRequest, userId string) (database ExportDatabase, errs []error)
func (*Serving) CreateFromInstance ¶
func (*Serving) CreateInstance ¶
func (*Serving) DeleteExportDatabase ¶
func (*Serving) DeleteInstanceForUser ¶
func (*Serving) DeleteInstanceWithPermHandling ¶ added in v0.0.2
func (*Serving) DeleteInstancesForUser ¶
func (*Serving) ExportInstanceCleanup ¶ added in v0.0.2
func (*Serving) GetExportDatabase ¶
func (f *Serving) GetExportDatabase(id string, userId string) (database ExportDatabase, errs []error)
func (*Serving) GetExportDatabases ¶
func (*Serving) GetInstance ¶
func (*Serving) GetInstances ¶
func (*Serving) GetInstancesForUser ¶
func (*Serving) UpdateExportDatabase ¶
func (f *Serving) UpdateExportDatabase(id string, req ExportDatabaseRequest, userId string) (database ExportDatabase, errs []error)
func (*Serving) UpdateInstance ¶
type ServingRequest ¶
type ServingRequest struct { FilterType string `json:"FilterType,omitempty" validate:"required"` Filter string `json:"Filter,omitempty" validate:"required"` Name string `json:"Name,omitempty" validate:"required"` EntityName string `json:"EntityName,omitempty" validate:"required"` ServiceName string `json:"ServiceName,omitempty" validate:"required"` Description string `json:"Description,omitempty"` Topic string `json:"Topic,omitempty" validate:"required"` TimePath string `json:"TimePath,omitempty"` TimePrecision string `json:"TimePrecision,omitempty"` Generated bool `json:"generated,omitempty"` Offset string `json:"Offset,omitempty" validate:"required"` ForceUpdate bool `json:"ForceUpdate,omitempty"` Values []ServingRequestValue `json:"Values,omitempty"` ExportDatabaseID string `json:"ExportDatabaseID,omitempty"` TimestampFormat string `json:"TimestampFormat,omitempty"` }
type ServingRequestValue ¶
Click to show internal directories.
Click to hide internal directories.