Documentation
¶
Index ¶
- Variables
- type CreateLayerRequest
- type CreateLayerResponse
- type CreateStyleRequest
- type CreateStyleResponse
- type DropLayerRequest
- type DropLayerResponse
- type FilerClient
- type ImportLayerRequest
- type ImportLayerResponse
- type JobEntity
- type JobStatus
- type LayerEntity
- type LayerStylesEntity
- type Repository
- type ScheduleImportLayerRequest
- type ScheduleImportLayerResponse
- type Scheduler
- type SendNotificationRequest
- type SendNotificationResponse
- type Service
- func (s Service) CreateLayer(ctx context.Context, req CreateLayerRequest) (CreateLayerResponse, error)
- func (s Service) CreateStyle(ctx context.Context, req CreateStyleRequest) (CreateStyleResponse, error)
- func (s Service) DropLayerTable(ctx context.Context, req DropLayerRequest) (DropLayerResponse, error)
- func (s Service) HealthCheckSrv(ctx context.Context) (string, error)
- func (s Service) ImportLayer(ctx context.Context, req ImportLayerRequest) (ImportLayerResponse, error)
- func (s Service) ScheduleImportLayer(ctx context.Context, fileKey string) (ScheduleImportLayerResponse, error)
- func (s Service) SendNotification(ctx context.Context, req SendNotificationRequest) error
- func (s Service) UpdateJob(ctx context.Context, req UpdateJobStatusRequest) error
- type StyleEntity
- type UpdateJobStatusRequest
- type UpdateJobStatusResponse
- type Validator
- type ValidatorRepository
- type Workflow
Constants ¶
This section is empty.
Variables ¶
View Source
var (
HealthCheckError = errors.New("health check failed")
)
Functions ¶
This section is empty.
Types ¶
type CreateLayerRequest ¶
==========================================================
type CreateLayerResponse ¶
type CreateStyleRequest ¶
type CreateStyleRequest struct {
FilePath string
}
==========================================================
type CreateStyleResponse ¶
type DropLayerRequest ¶
type DropLayerRequest struct {
TableName string
}
==========================================================
type DropLayerResponse ¶
type DropLayerResponse struct {
Success bool
}
type FilerClient ¶
type ImportLayerRequest ¶
type ImportLayerRequest struct {
FileKey string
}
==========================================================
type ImportLayerResponse ¶
type LayerEntity ¶
type LayerEntity struct {
ID types.ID `json:"id"`
Name string `json:"name"`
GeomType string `json:"geom_type"`
DefaultStyle types.ID `json:"default_style"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
TODO add new column system_cordiante
type LayerStylesEntity ¶
type Repository ¶
type Repository interface {
HealthCheck(ctx context.Context) (string, error)
AddJob(ctx context.Context, job JobEntity) (types.ID, error)
GetJobByToken(ctx context.Context, token string) (JobEntity, error)
UpdateJob(ctx context.Context, job JobEntity) (bool, error)
CreateLayer(ctx context.Context, layer LayerEntity) (types.ID, error)
DropTable(ctx context.Context, tableName string) (bool, error)
GetLayerByName(ctx context.Context, name string) (LayerEntity, error)
CreateStyle(ctx context.Context, style StyleEntity) (types.ID, error)
}
type ScheduleImportLayerRequest ¶
type ScheduleImportLayerRequest struct{}
type ScheduleImportLayerResponse ¶
type ScheduleImportLayerResponse struct {
WorkflowId string
}
type SendNotificationRequest ¶
type SendNotificationResponse ¶
type SendNotificationResponse struct{}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo Repository, validator Validator, scheduler Scheduler, queryClient FilerClient) Service
func (Service) CreateLayer ¶
func (s Service) CreateLayer(ctx context.Context, req CreateLayerRequest) (CreateLayerResponse, error)
func (Service) CreateStyle ¶
func (s Service) CreateStyle(ctx context.Context, req CreateStyleRequest) (CreateStyleResponse, error)
func (Service) DropLayerTable ¶
func (s Service) DropLayerTable(ctx context.Context, req DropLayerRequest) (DropLayerResponse, error)
func (Service) HealthCheckSrv ¶
func (Service) ImportLayer ¶
func (s Service) ImportLayer(ctx context.Context, req ImportLayerRequest) (ImportLayerResponse, error)
func (Service) ScheduleImportLayer ¶
func (Service) SendNotification ¶
func (s Service) SendNotification(ctx context.Context, req SendNotificationRequest) error
TODO: implement real notification
type StyleEntity ¶
type UpdateJobStatusRequest ¶
==========================================================
type UpdateJobStatusResponse ¶
type UpdateJobStatusResponse struct{}
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator(repo ValidatorRepository) Validator
type ValidatorRepository ¶
type ValidatorRepository interface {
}
Click to show internal directories.
Click to hide internal directories.