Documentation
¶
Index ¶
- Constants
- Variables
- func AddAliasAPI(s *Server)
- func CopyFile(dest io.Writer, path string) error
- func LoginRequiredMiddlewareWithConfig(a *auth.AuthService) echo.MiddlewareFunc
- func MiddlewareErrorHandler(middleware echo.MiddlewareFunc, cb func(e error, c echo.Context) error) echo.MiddlewareFunc
- func OpenDB(cfg DBConfig) (*sqlx.DB, error)
- func ProjectAccessMiddleware(a *auth.AuthService, ps application.ProjectService, basicAuthRealm string) echo.MiddlewareFunc
- func ProjectAdminAccessMiddleware(a *auth.AuthService, ps application.ProjectService) echo.MiddlewareFunc
- func ProjectSuperuserAccessMiddleware(a *auth.AuthService, ps application.ProjectService) echo.MiddlewareFunc
- func SessionMiddlewareWithConfig(store SessionStore) echo.MiddlewareFunc
- func SuperuserAccessMiddleware(a *auth.AuthService) echo.MiddlewareFunc
- type Account
- type AliasManager
- type AnyTag
- type AppConfig
- type AppData
- type AppPayload
- type CDATA
- type Config
- type DBConfig
- type Delete
- type GetFeature
- type Insert
- type InsertObject
- type InsertProperty
- type JSONSerializer
- type MediaFile
- type Middlewares
- type OwsGetFeatureRequestParams
- type OwsRequestParams
- type Plugins
- type ProgressReader
- type Property
- type PropertyName
- type PyQgisPlugin
- type Query
- type Server
- type SessionData
- type SessionStore
- type Transaction
- type Update
- type UserDashboard
- type UserInfo
Constants ¶
View Source
const MB int64 = 1024 * 1024
Variables ¶
View Source
var MaxJSONSize int64 = 2 * MB
View Source
var MaxScriptSize int64 = 5 * MB
Functions ¶
func AddAliasAPI ¶
func AddAliasAPI(s *Server)
func LoginRequiredMiddlewareWithConfig ¶
func LoginRequiredMiddlewareWithConfig(a *auth.AuthService) echo.MiddlewareFunc
func MiddlewareErrorHandler ¶
func MiddlewareErrorHandler(middleware echo.MiddlewareFunc, cb func(e error, c echo.Context) error) echo.MiddlewareFunc
func ProjectAccessMiddleware ¶
func ProjectAccessMiddleware(a *auth.AuthService, ps application.ProjectService, basicAuthRealm string) echo.MiddlewareFunc
func ProjectAdminAccessMiddleware ¶
func ProjectAdminAccessMiddleware(a *auth.AuthService, ps application.ProjectService) echo.MiddlewareFunc
func ProjectSuperuserAccessMiddleware ¶
func ProjectSuperuserAccessMiddleware(a *auth.AuthService, ps application.ProjectService) echo.MiddlewareFunc
func SessionMiddlewareWithConfig ¶
func SessionMiddlewareWithConfig(store SessionStore) echo.MiddlewareFunc
func SuperuserAccessMiddleware ¶
func SuperuserAccessMiddleware(a *auth.AuthService) echo.MiddlewareFunc
Types ¶
type Account ¶
type Account struct {
Username string `json:"username"`
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Superuser bool `json:"superuser"`
Active bool `json:"active"`
Created *time.Time `json:"created_at"`
Confirmed *time.Time `json:"confirmed_at"`
LastLogin *time.Time `json:"last_login_at"`
Profile map[string]any `json:"profile,omitempty"`
}
type AliasManager ¶
type AliasManager struct {
// contains filtered or unexported fields
}
type AppPayload ¶
type DBConfig ¶
type DBConfig struct {
User string
Password string
Host string
Name string
Port int
MaxIdleConns int
MaxOpenConns int
SSLMode string
StatementCacheMode string
}
Config is the required properties to use the database.
type GetFeature ¶
type Insert ¶
type Insert struct {
XMLName xml.Name `xml:"Insert"`
Objects []InsertObject `xml:",any"`
}
type InsertObject ¶
type InsertObject struct {
XMLName xml.Name
Properties []InsertProperty `xml:",any"`
}
type InsertProperty ¶
type JSONSerializer ¶
type JSONSerializer struct{}
func (JSONSerializer) Deserialize ¶
func (d JSONSerializer) Deserialize(c echo.Context, i interface{}) error
Deserialize reads a JSON from a request body and converts it into an interface.
type MediaFile ¶
type MediaFile struct {
domain.ProjectFile
Filename string `json:"filename"`
}
type Middlewares ¶
type Middlewares struct {
LoginRequired echo.MiddlewareFunc
SuperuserRequired echo.MiddlewareFunc
ProjectAdminAccess echo.MiddlewareFunc
ProjectSuperuserAccess echo.MiddlewareFunc
ProjectAccess echo.MiddlewareFunc
ProjectAccessOWS echo.MiddlewareFunc
}
type OwsRequestParams ¶
type Plugins ¶
type Plugins struct {
XMLName xml.Name `xml:"plugins"`
Plugins []PyQgisPlugin `xml:"plugins"`
}
type ProgressReader ¶
type ProgressReader struct {
Reader io.ReadCloser
Callback func(int, int)
Step int
Progress int
// contains filtered or unexported fields
}
ProgressReader export
func (*ProgressReader) Close ¶
func (r *ProgressReader) Close() error
type PropertyName ¶
type PyQgisPlugin ¶
type PyQgisPlugin struct {
XMLName xml.Name `xml:"pyqgis_plugin"`
Name string `xml:"name,attr" json:"name"`
QgisMinVersion string `xml:"qgis_minimum_version" json:"qgisMinimumVersion"`
QgisMaxVersion string `xml:"qgis_maximum_version,omitempty" json:"qgisMaximumVersion"`
Description CDATA `xml:"description" json:"description"`
About CDATA `xml:"about" json:"about"`
Version string `xml:"version,attr" json:"version"`
Author string `xml:"author_name" json:"author"`
// Email
Changelog CDATA `xml:"changelog" json:"changelog"`
Experimental string `xml:"experimental" json:"experimental"`
Deprecated string `xml:"deprecated" json:"deprecated"`
Tags string `xml:"tags" json:"tags"`
Homepage CDATA `xml:"homepage" json:"homepage"`
Repository CDATA `xml:"repository" json:"repository"`
Tracker CDATA `xml:"tracker" json:"tracker"`
Icon string `xml:"icon,omitempty" json:"icon,omitempty"`
Server string `xml:"server" json:"server"`
// not part of qgis metadata
Updated time.Time `xml:"update_date" json:"updated"`
// generated data
DownloadURL string `xml:"download_url"`
FileName string `xml:"file_name" json:"filename"`
}
type Query ¶
type Query struct {
XMLName xml.Name `xml:"Query"`
TypeName string `xml:"typeName,attr"`
Properties []PropertyName `xml:"ogc:PropertyName"`
Contents []AnyTag `xml:",any"`
}
type Server ¶
type Server struct {
Config Config
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(log *zap.SugaredLogger, cfg Config, db *sqlx.DB, as *auth.AuthService, signUpService *application.AccountsService, projects application.ProjectService, sws *ws.SettingsWS, limiter application.AccountsLimiter, notifications *project.RedisNotificationStore) *Server
func (*Server) AddExtension ¶
func (*Server) ListenAndServe ¶
func (*Server) OnShutdown ¶
func (s *Server) OnShutdown(fn func())
type SessionData ¶
type SessionStore ¶
type Transaction ¶
type UserDashboard ¶
type UserDashboard struct {
Projects []string `json:"projects"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.