rest

package
v0.0.0-...-896db50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2022 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const CharacCsvColumnAatId = 8
View Source
const CharacCsvColumnArkId = 6
View Source
const CharacCsvColumnId = 0
View Source
const CharacCsvColumnName = 1
View Source
const CharacCsvColumnPactolsId = 7
View Source
const CharacCsvColumnPath0 = 1
View Source
const CharacCsvColumnPath1 = 2
View Source
const CharacCsvColumnPath2 = 3
View Source
const CharacCsvColumnPath3 = 4
View Source
const CharacCsvColumnPath4 = 5

Variables

View Source
var MapSqlDefDatabase = MapSqlTableDef{
	TableName: "database",
	Joins: []MapSqlJoin{
		{
			JoinLeftTable:  "site",
			JoinLeftKey:    "database_id",
			JoinRightTable: "database",
			JoinRightKey:   "id",
		},
	},
}
View Source
var MapSqlDefSite = MapSqlTableDef{
	TableName: "site",
	Joins:     []MapSqlJoin{},
}
View Source
var MapSqlDefSiteRange = MapSqlTableDef{
	TableName: "site_range",
	Joins: []MapSqlJoin{
		{
			JoinLeftTable:  "site",
			JoinLeftKey:    "id",
			JoinRightTable: "site_range",
			JoinRightKey:   "site_id",
		},
	},
}
View Source
var MapSqlDefSiteRangeCharac = MapSqlTableDef{
	TableName: "site_range__charac",
	Joins: []MapSqlJoin{
		{
			JoinLeftTable:  "site_range",
			JoinLeftKey:    "id",
			JoinRightTable: "site_range__charac",
			JoinRightKey:   "site_range_id",
		},
	},
}
View Source
var MapSqlDefSiteRangeCharacTr = MapSqlTableDef{
	TableName: "site_range__charac_tr",
	Joins: []MapSqlJoin{
		{
			JoinLeftTable:  "site_range__charac",
			JoinLeftKey:    "id",
			JoinRightTable: "site_range__charac_tr",
			JoinRightKey:   "site_range__charac_id",
		},
		{
			JoinLeftTable:  "database",
			JoinLeftKey:    "default_language",
			JoinRightTable: "site_range__charac_tr",
			JoinRightKey:   "lang_isocode",
		},
	},
}
View Source
var MapSqlDefXSite = MapSqlTableDef{
	TableName: "site",
	Joins: []MapSqlJoin{
		{
			JoinLeftTable:  "site",
			JoinLeftKey:    "id",
			JoinRightTable: "site",
			JoinRightKey:   "id",
		},
	},
}

Functions

func ArkeoError

func ArkeoError(w http.ResponseWriter, code int, description string)

func CharacListCsv

func CharacListCsv(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CharacSetHiddens

func CharacSetHiddens(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CharacsAll

func CharacsAll(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CharacsDelete

func CharacsDelete(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CharacsGetTree

func CharacsGetTree(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CharacsRoots

func CharacsRoots(w http.ResponseWriter, r *http.Request, proute routes.Proute)

CharacsRoots write all root characs in all languages

func CharacsUpdate

func CharacsUpdate(w http.ResponseWriter, r *http.Request, proute routes.Proute)

CharacsUpdate Create/Update a charac

func CharacsUpdateZip

func CharacsUpdateZip(w http.ResponseWriter, r *http.Request, proute routes.Proute)

CharacsUpdateZip Create/Update all characs from a zip file containing multiple languages

func ChronologiesAll

func ChronologiesAll(w http.ResponseWriter, r *http.Request, proute routes.Proute)

ChronologiesAll write all chronologies in all languages in a flat array

func ChronologiesDelete

func ChronologiesDelete(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func ChronologiesGetTree

func ChronologiesGetTree(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func ChronologiesListCsv

func ChronologiesListCsv(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func ChronologiesRoots

func ChronologiesRoots(w http.ResponseWriter, r *http.Request, proute routes.Proute)

ChronologiesRoots write all root chronologies in all languages

func ChronologiesUpdate

func ChronologiesUpdate(w http.ResponseWriter, r *http.Request, proute routes.Proute)

ChronologiesUpdate Create/Update a chronology

func CityCreate

func CityCreate(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CityDelete

func CityDelete(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CityGet

func CityGet(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CityInfos

func CityInfos(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CityList

func CityList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CityUpdate

func CityUpdate(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CompanyCreate

func CompanyCreate(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CompanyDelete

func CompanyDelete(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CompanyGet

func CompanyGet(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CompanyInfos

func CompanyInfos(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CompanyList

func CompanyList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CompanyUpdate

func CompanyUpdate(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func ContinentsList

func ContinentsList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func CountryList

func CountryList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func DatabaseDelete

func DatabaseDelete(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func DatabaseEnumList

func DatabaseEnumList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

DatabaseEnumList returns the list of enums fields We have to link them with a translation manually clientside

func DatabaseExportCSVArkeogis

func DatabaseExportCSVArkeogis(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func DatabaseExportList

func DatabaseExportList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

DatabaseExportList returns the list of databases as csv

func DatabaseExportXML

func DatabaseExportXML(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func DatabaseExportZIPOmeka

func DatabaseExportZIPOmeka(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func DatabaseGetImportedCSV

func DatabaseGetImportedCSV(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func DatabaseInfos

func DatabaseInfos(w http.ResponseWriter, r *http.Request, proute routes.Proute)

DatabaseInfos return detailed infos on an database

func DatabaseList

func DatabaseList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

DatabaseList returns the list of databases

func DeleteLayer

func DeleteLayer(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func GetExportLayers

func GetExportLayers(w http.ResponseWriter, r *http.Request, proute routes.Proute)

GetLayers returns layers list

func GetLayer

func GetLayer(w http.ResponseWriter, r *http.Request, proute routes.Proute)

GetLayer returns all infos about a layer

func GetLayers

func GetLayers(w http.ResponseWriter, r *http.Request, proute routes.Proute)

GetLayers returns layers list

func GetProject

func GetProject(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func GetShpGeojson

func GetShpGeojson(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func GetSite

func GetSite(w http.ResponseWriter, r *http.Request, proute routes.Proute)

GetSite returns all informations about a site

func GroupAddUser

func GroupAddUser(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func GroupDelUser

func GroupDelUser(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func GroupGet

func GroupGet(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func GroupList

func GroupList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

GroupList List the groups.

func GroupSet

func GroupSet(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func ImportStep1

func ImportStep1(w http.ResponseWriter, r *http.Request, proute routes.Proute)

ImportStep1 is called by rest

func ImportStep1Update

func ImportStep1Update(w http.ResponseWriter, r *http.Request, proute routes.Proute)

ImportStep1Update is called by rest

func ImportStep3

func ImportStep3(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func ImportStep4

func ImportStep4(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func LangList

func LangList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

LangList return the list of langs in arkeogis

func LicencesList

func LicencesList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

LicencesList returns the list of databases

func LicensesList

func LicensesList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

LicensesList returns the list of licenses which can be assigned to databases

func MapSearch

func MapSearch(w http.ResponseWriter, r *http.Request, proute routes.Proute)

MapSearch search for sites using many filters

func MapSearchToCSV

func MapSearchToCSV(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func P

func P()

func QueryDelete

func QueryDelete(w http.ResponseWriter, r *http.Request, proute routes.Proute)

QueryDelete delete the query

func QueryGet

func QueryGet(w http.ResponseWriter, r *http.Request, proute routes.Proute)

QueryGet get the query

func QuerySave

func QuerySave(w http.ResponseWriter, r *http.Request, proute routes.Proute)

QuerySave save the query

func SaveProject

func SaveProject(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func SaveShpLayer

func SaveShpLayer(w http.ResponseWriter, r *http.Request, proute routes.Proute)

SaveShpLayer saves shp file on filesystem and datas into database

func SaveWmLayer

func SaveWmLayer(w http.ResponseWriter, r *http.Request, proute routes.Proute)

SaveWmLayer save wm(t)s layer informations into database

func StatsGet

func StatsGet(w http.ResponseWriter, r *http.Request, proute routes.Proute)

StatsGet return some stats

func TranslatesList

func TranslatesList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

TranslatesList List root translations...

func TranslatesSave

func TranslatesSave(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserCreate Create a user, see usercreate struct inside this function for json content

func UserCreate

func UserCreate(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserCreate Create a user, see usercreate struct inside this function for json content

func UserDelete

func UserDelete(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserDelete delete an user.

func UserInfos

func UserInfos(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserInfos return detailed infos on an user

func UserList

func UserList(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserList List of users. no filets, no args actually...

func UserLogin

func UserLogin(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserLogin Check Login

func UserLogout

func UserLogout(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserLogout will destroy it's session

func UserPhoto

func UserPhoto(w http.ResponseWriter, r *http.Request, proute routes.Proute)

func UserReLogin

func UserReLogin(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserLogin Check Login

func UserSearch

func UserSearch(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserSearch returns minimalist informations about users

func UserUpdate

func UserUpdate(w http.ResponseWriter, r *http.Request, proute routes.Proute)

UserUpdate update an user.

Types

type CharacGetParams

type CharacGetParams struct {
	Id         int `min:"1" error:"Charac Id is mandatory"`
	Project_id int
}

type CharacListCsvParams

type CharacListCsvParams struct {
	Id      int    `min:"1" error:"Charac Id is mandatory"`
	Isocode string `json:"isocode"`
	Dl      string `json:"dl"`
	Html    int    `json:"html"`
}

type CharacRootsParams

type CharacRootsParams struct {
	Project_id int
}

type CharacSetHiddensParams

type CharacSetHiddensParams struct {
	Id         int `min:"1" error:"Charac Id is mandatory"`
	Project_id int
}

type CharacSetHiddensStruct

type CharacSetHiddensStruct struct {
	HiddenIds []int `json:"hidden_ids"`
}

CharacSetHiddensStruct structure (json)

type CharacTreeStruct

type CharacTreeStruct struct {
	model.Charac
	Name        map[string]string        `json:"name"`
	Description map[string]string        `json:"description"`
	Content     []CharacTreeStruct       `json:"content"`
	Hidden      bool                     `json:"hidden"`
	UsageCount  int                      `json:"usageCount"`
	Usages      []CharacTreeStructCounts `json:"usages"`
}

type CharacTreeStructCounts

type CharacTreeStructCounts struct {
	Name       string `json:"name"`
	UsageCount int    `json:"usagecount"`
}

type CharacsUpdateStruct

type CharacsUpdateStruct struct {
	model.Charac_root
	CharacTreeStruct
	UsersInGroup []model.User `json:"users_in_group" ignore:"true"` // read-only, used to display users of the group
	Author       model.User   `json:"author" ignore:"true"`         // read-only, used to display users of the group
}

CharacsUpdateStruct structure (json)

type CharacsZipUpdateStruct

type CharacsZipUpdateStruct struct {
	CharacId   int    `json:"characId"`
	ZipContent []byte `json:"zipContent"`
}

type ChronologiesRootsParams

type ChronologiesRootsParams struct {
	Bounding_box string
	Active       bool `json:"active"`
	Start_date   int  `json:"start_date"`
	End_date     int  `json:"end_date"`
	Check_dates  bool `json:"check_dates"`
}

ChronologiesRootsStruct holds get params passed to ChronologiesRoots

type ChronologiesUpdateStruct

type ChronologiesUpdateStruct struct {
	model.Chronology_root
	ChronologyTreeStruct
	UsersInGroup []model.User `json:"users_in_group" ignore:"true"` // read-only, used to display users of the group
	Author       model.User   `json:"author" ignore:"true"`         // read-only, used to display users of the group
}

ChronologiesUpdateStruct structure (json)

type ChronologyGetParams

type ChronologyGetParams struct {
	Id     int `min:"1" error:"Chronology Id is mandatory"`
	Active bool
}

type ChronologyListCsvParams

type ChronologyListCsvParams struct {
	Isocode string `json:"isocode"`
	Id      int    `json:"id"`
	Dl      string `json:"dl"`
}

type ChronologyTreeStruct

type ChronologyTreeStruct struct {
	model.Chronology
	Name        map[string]string      `json:"name"`
	Description map[string]string      `json:"description"`
	Content     []ChronologyTreeStruct `json:"content"`
}

type CityGetParams

type CityGetParams struct {
	Id_city int `default:"0" min:"0"`
}

type CityListParams

type CityListParams struct {
	Id_country int    `default:"0" min:"0"`
	Search     string `default:"" regexp:"^[^%]*$"`
}

type Company

type Company struct {
	model.Company
	CityAndCountry model.CityAndCountry_wtr `json:"city_and_country"`
	SearchName     string                   `json:"searchname"`
}

type CompanyGetParams

type CompanyGetParams struct {
	Id int `json:"id"`
}

type CompanyGetResult

type CompanyGetResult struct {
	model.Company
	CityAndCountry model.CityAndCountry_wtr `json:"city_and_country"`
}

type CompanyListParams

type CompanyListParams struct {
	Search string
}

type ContinentsListParams

type ContinentsListParams struct {
	Search string
}

type CountryListParams

type CountryListParams struct {
	Search string
}

type DatabaseExportInfosParams

type DatabaseExportInfosParams struct {
	Id             int `min:"0" error:"Database Id is mandatory"`
	ImportID       int
	IncludeSiteId  bool
	IncludeInterop bool
}

type DatabaseExportOmekaParams

type DatabaseExportOmekaParams struct {
	Id           int `min:"0" error:"Database Id is mandatory"`
	ChronologyId int `min:"0" error:"chronology is mandatory"`
}

type DatabaseInfosParams

type DatabaseInfosParams struct {
	Id       int `min:"0" error:"Database Id is mandatory"`
	ImportID int
}

DatabaseInfosParams are params received by REST query

type DatabaseListExportParams

type DatabaseListExportParams struct {
	Lang string
}

type DatabaseListParams

type DatabaseListParams struct {
	Bounding_box string
	Start_date   int  `json:"start_date"`
	End_date     int  `json:"end_date"`
	Check_dates  bool `json:"check_dates"`
}

type GetProjectParams

type GetProjectParams struct {
	User_id int `json:"user_id"`
	Id      int `json:"id"`
}

type GetSiteParams

type GetSiteParams struct {
	ID int `min:"1"`
}

type GroupGetParams

type GroupGetParams struct {
	Id int `min:"0" error:"id over boundaries"`
}

type GroupListParams

type GroupListParams struct {
	Type   string `default:"user" enum:"user,charac,chronology"`
	Limit  int    `default:"10" min:"1" max:"100" error:"limit over boundaries"`
	Page   int    `default:"1" min:"1" error:"page over boundaries"`
	Order  string `default:"g_tr.name" enum:"g.created_at,-g.created_at,g.updated_at,-g.updated_at,g_tr.name,-g_tr.name" error:"bad order"`
	Filter string `default:""`
}

GroupListParams is params struct for GroupList query

type GroupSetPost

type GroupSetPost struct {
	model.Group
	Users []model.User `json:"users" ignore:"true"`
}

type ImportStep1T

type ImportStep1T struct {
	Name                string `min:"3" max:"75" error:"Wrong length for database name"`
	Geographical_extent string `enum:"undefined,country,continent,international_waters,world" error:"Wrong geographical extent"`
	Default_language    string `min:"2" max:"2" error:"Wrong lang"`
	Continents          []model.Continent
	Countries           []model.Country
	UseGeonames         bool
	Separator           string `min:"1" max:"1" error:"Wrong separator"`
	EchapCharacter      string `min:"1" max:"1" error:"Wrong echap characted"`
	File                *routes.File
}

ImportStep1T struct holds information provided by user

type ImportStep1UpdateT

type ImportStep1UpdateT struct {
	Id                  int
	Name                string `min:"3" max:"75" error:"Wrong length for database name"`
	Default_language    string `min:"2" max:"2" error:"Wrong lang"`
	Geographical_extent string
	Continents          []model.Continent
	Countries           []model.Country
}

ImportStep1UpdateT struct holds information provided by user

type ImportStep3T

type ImportStep3T struct {
	Id                     int    `min:"1" error:"Wrong database id"`
	Authors                []int  `min:"1" error:"Wrong num of authors"`
	Type                   string `enum:"undefined,inventory,research,literary-work" error:"Wrong database type"`
	Declared_creation_date time.Time
	Contexts               []string `min:"1" error:"Wrong context"`
	License_ID             int      `min:"1" error:"Wrong license id"`
	Scale_resolution       string   `min:"1" error:"Scale resolution is mandatory"`
	Subject                string   `min:"1" error:"Subject is mandatory"`
	State                  string   `min:"1" error:"State is mandatory"`
	Project_ID             int      `min:"1" error:"Project id is mandatory"`
	Published              bool
	Public                 bool
	Description            []struct {
		Lang_Isocode string
		Text         string
	} `min:"1" error:"Description is mandatory"`
}

type ImportStep4T

type ImportStep4T struct {
	Id                            int
	Import_ID                     int
	Editor                        string
	Editor_url                    string
	Contributor                   string
	Source_description            string
	Context_description           string
	Source_url                    string
	Source_declared_creation_date time.Time
	Source_relation               string
	Source_identifier             string
	Geographical_Limit            []struct {
		Lang_Isocode string
		Text         string
	}
	Bibliography []struct {
		Lang_Isocode string
		Text         string
	}
	Re_use []struct {
		Lang_Isocode string
		Text         string
	}
}

type LangGetParams

type LangGetParams struct {
	Active int
}

LangGetParams are params received by REST query

type LayerParams

type LayerParams struct {
	Id      int    `json:"id" min:"1"`
	Type    string `json:"type" min:"3" max:"3"`
	GeoJson bool   `json:"geojson"`
}

type LayersExportParams

type LayersExportParams struct {
	LayersParams
	Lang string `json:"lang" min:"0" max:"2"`
}

type LayersParams

type LayersParams struct {
	Ids          []int `json:"ids"`
	Type         string
	Published    bool
	Author       int
	Iso_code     string
	Bounding_box string
	Start_date   int  `json:"start_date"`
	End_date     int  `json:"end_date"`
	Check_dates  bool `json:"check_dates"`
}

type LoginAnswer

type LoginAnswer struct {
	User        model.User
	Token       string
	Lang1       model.Lang             `json:"lang1"`
	Lang2       model.Lang             `json:"lang2"`
	Project     model.ProjectFullInfos `json:"project"`
	Permissions []model.Permission     `json:"permissions"`
}

type MapSearchParams

type MapSearchParams struct {
	Knowledge    map[string]bool               `json:"knowledge"`
	Occupation   map[string]bool               `json:"occupation"`
	Database     []int                         `json:"database"`
	Chronologies []MapSearchParamsChronology   `json:"chronologies"`
	Characs      map[int]MapSearchParamsCharac `json:"characs"`
	Others       MapSearchParamsOthers         `json:"others"`
	Area         MapSearchParamsArea           `json:"area"`
}

MapSearchParams is the query filter for searching sites

type MapSearchParamsArea

type MapSearchParamsArea struct {
	Type    string                      `json:"type"`
	Lat     float32                     `json:"lat"`
	Lng     float32                     `json:"lng"`
	Radius  float32                     `json:"radius"`
	Geojson MapSearchParamsAreaGeometry `json:"geojson"`
}

type MapSearchParamsAreaGeometry

type MapSearchParamsAreaGeometry struct {
	Geometry sqlx_types.JSONText `json:"geometry"`
}

type MapSearchParamsCharac

type MapSearchParamsCharac struct {
	Include     bool `json:"include"`
	Exceptional bool `json:"exceptional"`
	RootId      int  `json:"root_id"`
}

type MapSearchParamsChronology

type MapSearchParamsChronology struct {
	StartDate                int    `json:"start_date"`
	EndDate                  int    `json:"end_date"`
	ExistenceInsideInclude   string `json:"existence_inside_include"`
	ExistenceInsidePart      string `json:"existence_inside_part"`
	ExistenceInsideSureness  string `json:"existence_inside_sureness"`
	ExistenceOutsideInclude  string `json:"existence_outside_include"`
	ExistenceOutsideSureness string `json:"existence_outside_sureness"`
	SelectedChronologyId     int    `json:"selected_chronology_id"`
}

type MapSearchParamsOthers

type MapSearchParamsOthers struct {
	Centroid      string   `json:"centroid"`
	CharacsLinked string   `json:"characs_linked"`
	Knowledges    []string `json:"knowledges"`
	Occupation    []string `json:"occupation"`
	TextSearch    string   `json:"text_search"`
	TextSearchIn  []string `json:"text_search_in"`
}

type MapSqlJoin

type MapSqlJoin struct {
	JoinLeftTable  string
	JoinLeftKey    string
	JoinRightTable string
	JoinRightKey   string
}

type MapSqlQuery

type MapSqlQuery struct {
	Tables []*MapSqlQueryTable
	Wheres []*MapSqlQueryWhere
}

func (*MapSqlQuery) AddFilter

func (sql *MapSqlQuery) AddFilter(tableas string, where string, args ...interface{})

func (*MapSqlQuery) AddTable

func (sql *MapSqlQuery) AddTable(tabledef *MapSqlTableDef, as string, usedforexclude bool)

func (*MapSqlQuery) BuildQuery

func (sql *MapSqlQuery) BuildQuery() (string, []interface{})

func (*MapSqlQuery) FindTable

func (sql *MapSqlQuery) FindTable(tableas string, trymebefore *MapSqlQueryTable) (table *MapSqlQueryTable, ok bool)

func (*MapSqlQuery) Init

func (sql *MapSqlQuery) Init()

type MapSqlQueryTable

type MapSqlQueryTable struct {
	TableDef       *MapSqlTableDef
	As             string
	UsedForExclude bool
}

type MapSqlQueryWhere

type MapSqlQueryWhere struct {
	Table *MapSqlQueryTable
	Where string
	Args  []interface{}
}

type MapSqlTableDef

type MapSqlTableDef struct {
	TableName string
	Joins     []MapSqlJoin
}

type PhotoGetParams

type PhotoGetParams struct {
	Id int `min:"0" error:"Photo Id is mandatory"`
}

type QueryDeleteParams

type QueryDeleteParams struct {
	Project_id int    `json:"project_id" min:"1"`
	Name       string `json:"name" min:"1"`
}

type QueryGetParams

type QueryGetParams struct {
	Project_id int
}

type QuerySaveParams

type QuerySaveParams struct {
	ProjectId int    `json:"project_id" min:"1"`
	Name      string `json:"name" min:"1"`
	Params    string `json:"params" min:"1"`
}

type SaveProjectParams

type SaveProjectParams struct {
	Name         string                 `json:"name"`
	Id           int                    `default:"0" json:"id"`
	User_id      int                    `json:"-"`
	Start_date   int                    `json:"start_date"`
	End_date     int                    `json:"end_date"`
	Geom         string                 `json:"geom"`
	Chronologies []int                  `json:"chronologies"`
	Layers       []model.LayerFullInfos `json:"layers"`
	Databases    []int                  `json:"databases"`
	Characs      []int                  `json:"characs"`
}

type SaveShpParams

type SaveShpParams struct {
	Id                       int
	Author_Id                int
	Authors                  []int
	Filename                 string
	Geojson                  string
	Geojson_with_data        string
	Start_date               int
	End_date                 int
	Geographical_extent_geom string
	Published                bool
	File                     *routes.File
	License                  string
	License_id               int
	Declared_creation_date   time.Time
	Attribution              string
	Copyright                string
	Name                     []struct {
		Lang_Isocode string
		Text         string
	}
	Description []struct {
		Lang_Isocode string
		Text         string
	}
}

type SaveWmLayerParams

type SaveWmLayerParams struct {
	Id                       int
	Authors                  []int
	Type                     string
	Url                      string
	Identifier               string
	Min_scale                int
	Max_scale                int
	Start_date               int
	End_date                 int
	Image_format             string
	Geographical_extent_geom string
	Published                bool
	License                  string
	License_id               int
	Attribution              string
	Copyright                string
	Tile_matrix_set          string
	Tile_matrix_string       string
	Use_proxy                bool
	Max_usage_date           time.Time
	Name                     []struct {
		Lang_Isocode string
		Text         string
	}
	Description []struct {
		Lang_Isocode string
		Text         string
	}
}

type StatsResult

type StatsResult struct {
	DbCount   int `json:"dbcount"`
	SiteCount int `json:"sitecount"`
}

type TranslateListParams

type TranslateListParams struct {
	Lang   string `default:"en" min:"2" max:"2"` // todo: sanitize using regular expression
	Side   string `default:"web" enum:"server,web,*"`
	Domain string
}

type TranslateSaveParams

type TranslateSaveParams struct {
	Lang   string `default:"en" min:"2" max:"2"` // todo: sanitize using regular expression
	Side   string `default:"web" enum:"server,web,*"`
	Domain string
}

type UserGetParams

type UserGetParams struct {
	Id int `min:"0" error:"User Id is mandatory"`
}

type UserListParams

type UserListParams struct {
	Limit  int    `default:"10" min:"1" max:"10000" error:"limit over boundaries"`
	Page   int    `default:"1" min:"1" error:"page over boundaries"`
	Order  string `` /* 267-byte string literal not displayed */
	Filter string `default:""`
}

UserListParams is params struct for UserList query

type UserSearchParams

type UserSearchParams struct {
	Text string `min:"0" error:"Search string is mandatory"`
}

type Usercreate

type Usercreate struct {
	model.User
	CityAndCountry model.CityAndCountry_wtr `json:"city_and_country"`
	Companies      []Company                `json:"companies"`
	File           *routes.File
	Groups         []model.Group `json:"groups"`

	// overrides
	Password string `json:"password"`
}

UserCreate structure (json)

type Userinfos

type Userinfos struct {
	Usercreate

	// overrides
	Password string `json:"-"`

	// databases
	Databases []model.Database `json:"databases"`
}

type Userlogin

type Userlogin struct {
	Username string
	Password string
}

Userlogin structure (json)

type Valuedisplay

type Valuedisplay struct {
	Value   int    `json:"value"`
	Display string `json:"display"`
}

Structures for create

type ZipContent

type ZipContent struct {
	IsoCode string
	CSV     string
	Decoded [][]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL