Documentation ¶
Overview ¶
Package thing provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.
Package thing provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.
Index ¶
- Constants
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type CountParams
- type CreateJSONRequestBody
- type EchoRouter
- type Error
- type GeoJsonParams
- type ListByExternalIdParams
- type ListParams
- type PGX
- func (db *PGX) Count(params CountParams) (int32, error)
- func (db *PGX) CountTypeThing(params TypeThingCountParams) (int32, error)
- func (db *PGX) Create(t Thing) (*Thing, error)
- func (db *PGX) CreateTypeThing(tt TypeThing) (*TypeThing, error)
- func (db *PGX) Delete(id uuid.UUID, userId int32) error
- func (db *PGX) DeleteTypeThing(id int32, userId int32) error
- func (db *PGX) Exist(id uuid.UUID) bool
- func (db *PGX) GeoJson(offset, limit int, params GeoJsonParams) (string, error)
- func (db *PGX) Get(id uuid.UUID) (*Thing, error)
- func (db *PGX) GetTypeThing(id int32) (*TypeThing, error)
- func (db *PGX) GetTypeThingMaxId(id int32) (int32, error)
- func (db *PGX) IsThingActive(id uuid.UUID) bool
- func (db *PGX) IsUserOwner(id uuid.UUID, userId int32) bool
- func (db *PGX) List(offset, limit int, params ListParams) ([]*ThingList, error)
- func (db *PGX) ListByExternalId(offset, limit int, externalId int) ([]*ThingList, error)
- func (db *PGX) ListTypeThing(offset, limit int, params TypeThingListParams) ([]*TypeThingList, error)
- func (db *PGX) Search(offset, limit int, params SearchParams) ([]*ThingList, error)
- func (db *PGX) Update(id uuid.UUID, t Thing) (*Thing, error)
- func (db *PGX) UpdateTypeThing(id int32, tt TypeThing) (*TypeThing, error)
- type Permission
- type SearchParams
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) Count(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Create(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Delete(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GeoJson(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Get(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) List(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ListByExternalId(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Search(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TypeThingCount(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TypeThingCreate(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TypeThingDelete(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TypeThingGet(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TypeThingList(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TypeThingUpdate(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Update(ctx echo.Context) error
- type Service
- func (s Service) Count(ctx echo.Context, params CountParams) error
- func (s Service) Create(ctx echo.Context) error
- func (s Service) Delete(ctx echo.Context, thingId uuid.UUID) error
- func (s Service) GeoJson(ctx echo.Context, params GeoJsonParams) error
- func (s Service) Get(ctx echo.Context, thingId uuid.UUID) error
- func (s Service) List(ctx echo.Context, params ListParams) error
- func (s Service) ListByExternalId(ctx echo.Context, externalId int32, params ListByExternalIdParams) error
- func (s Service) Search(ctx echo.Context, params SearchParams) error
- func (s Service) TypeThingCount(ctx echo.Context, params TypeThingCountParams) error
- func (s Service) TypeThingCreate(ctx echo.Context) error
- func (s Service) TypeThingDelete(ctx echo.Context, typeThingId int32) error
- func (s Service) TypeThingGet(ctx echo.Context, typeThingId int32) error
- func (s Service) TypeThingList(ctx echo.Context, params TypeThingListParams) error
- func (s Service) TypeThingUpdate(ctx echo.Context, typeThingId int32) error
- func (s Service) Update(ctx echo.Context, thingId uuid.UUID) error
- type Storage
- type Thing
- type ThingList
- type ThingStatus
- type TypeThing
- type TypeThingCountParams
- type TypeThingCreateJSONRequestBody
- type TypeThingList
- type TypeThingListParams
- type TypeThingUpdateFormdataRequestBody
- type UpdateFormdataRequestBody
Constants ¶
const ( FieldCannotBeEmpty = "field %s cannot be empty or contain only spaces" FieldMinLengthIsN = "field %s minimum length is %d" FoundNum = ", found %d" FunctionNReturnedNoResults = "%s returned no results " OnlyAdminCanManageTypeThings = "only admin user can manage type thing" SelectFailedInNWithErrorE = "pgxscan.Select unexpectedly failed in %s, error : %v" )
const (
JWTAuthScopes = "JWTAuth.Scopes"
)
const (
MinNameLength = 5
)
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type CountParams ¶
type CountParams struct { // Keywords text keywords to filter the things to return Keywords *string `form:"keywords,omitempty" json:"keywords,omitempty"` // Type TypeThing id to filter by the things to return Type *int32 `form:"type,omitempty" json:"type,omitempty"` // CreatedBy id of the creator to filter by the things to return CreatedBy *int32 `form:"created_by,omitempty" json:"created_by,omitempty"` // Inactivated inactivated flag to filter the things to return Inactivated *bool `form:"inactivated,omitempty" json:"inactivated,omitempty"` // Validated validation flag to filter the things to return Validated *bool `form:"validated,omitempty" json:"validated,omitempty"` }
CountParams defines parameters for Count.
type CreateJSONRequestBody ¶
type CreateJSONRequestBody = Thing
CreateJSONRequestBody defines body for Create for application/json ContentType.
type EchoRouter ¶
type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route }
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type GeoJsonParams ¶ added in v0.0.6
type GeoJsonParams struct { // Type TypeThing id to filter by the things to return Type *int32 `form:"type,omitempty" json:"type,omitempty"` // CreatedBy id of the creator to filter by the things to return CreatedBy *int32 `form:"created_by,omitempty" json:"created_by,omitempty"` // Inactivated inactivated flag to filter the things to return Inactivated *bool `form:"inactivated,omitempty" json:"inactivated,omitempty"` // Validated validation flag to filter the things to return Validated *bool `form:"validated,omitempty" json:"validated,omitempty"` // Limit maximum number of results to return Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"` // Offset offset rows to skip before returning rows Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"` }
GeoJsonParams defines parameters for GeoJson.
type ListByExternalIdParams ¶
type ListByExternalIdParams struct { // Limit maximum number of results to return Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"` // Offset offset rows to skip before returning rows Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"` }
ListByExternalIdParams defines parameters for ListByExternalId.
type ListParams ¶
type ListParams struct { // Type TypeThing id to filter by the things to return Type *int32 `form:"type,omitempty" json:"type,omitempty"` // CreatedBy id of the creator to filter by the things to return CreatedBy *int32 `form:"created_by,omitempty" json:"created_by,omitempty"` // Inactivated inactivated flag to filter the things to return Inactivated *bool `form:"inactivated,omitempty" json:"inactivated,omitempty"` // Validated validation flag to filter the things to return Validated *bool `form:"validated,omitempty" json:"validated,omitempty"` // Limit maximum number of results to return Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"` // Offset offset rows to skip before returning rows Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"` }
ListParams defines parameters for List.
type PGX ¶
func (*PGX) Count ¶
func (db *PGX) Count(params CountParams) (int32, error)
Count returns the number of thing stored in DB
func (*PGX) CountTypeThing ¶
func (db *PGX) CountTypeThing(params TypeThingCountParams) (int32, error)
CountTypeThing returns the number of TypeThing based on search criteria
func (*PGX) CreateTypeThing ¶
CreateTypeThing will store the new TypeThing in the database
func (*PGX) DeleteTypeThing ¶
DeleteTypeThing deletes the TypeThing stored in DB with given id
func (*PGX) GeoJson ¶ added in v0.0.6
func (db *PGX) GeoJson(offset, limit int, params GeoJsonParams) (string, error)
func (*PGX) GetTypeThing ¶
GetTypeThing will retrieve the TypeThing with given id
func (*PGX) GetTypeThingMaxId ¶
GetTypeThingMaxId will retrieve maximum value of TypeThing id existing in store.
func (*PGX) IsThingActive ¶
IsThingActive returns true if the thing with the specified id has the inactivated attribute set to false
func (*PGX) IsUserOwner ¶
IsUserOwner returns true only if userId is the creator of the record (owner) of this thing in store.
func (*PGX) List ¶
func (db *PGX) List(offset, limit int, params ListParams) ([]*ThingList, error)
List returns the list of existing things with the given offset and limit.
func (*PGX) ListByExternalId ¶
ListByExternalId returns the list of existing things having given externalId with the given offset and limit.
func (*PGX) ListTypeThing ¶
func (db *PGX) ListTypeThing(offset, limit int, params TypeThingListParams) ([]*TypeThingList, error)
ListTypeThing returns the list of existing TypeThing with the given offset and limit.
func (*PGX) Search ¶
func (db *PGX) Search(offset, limit int, params SearchParams) ([]*ThingList, error)
type Permission ¶
type Permission int8 // enum
const ( R Permission = iota // Read implies List (SELECT in DB, or GET in API) W // implies INSERT,UPDATE, DELETE M // Update or Put only D // Delete only C // Create only (Insert, Post) P // change Permissions of one thing O // change Owner of one Thing A // Audit log of changes of one thing and read only special _fields like _created_by )
func (Permission) String ¶
func (s Permission) String() string
type SearchParams ¶
type SearchParams struct { // Keywords text keywords to filter the things to return Keywords *string `form:"keywords,omitempty" json:"keywords,omitempty"` // Type TypeThing id to filter by the things to return Type *int32 `form:"type,omitempty" json:"type,omitempty"` // CreatedBy id of the creator to filter by the things to return CreatedBy *int32 `form:"created_by,omitempty" json:"created_by,omitempty"` // Inactivated inactivated flag to filter the things to return Inactivated *bool `form:"inactivated,omitempty" json:"inactivated,omitempty"` // Validated validation flag to filter the things to return Validated *bool `form:"validated,omitempty" json:"validated,omitempty"` // Limit maximum number of results to return Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"` // Offset offset rows to skip before returning rows Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"` }
SearchParams defines parameters for Search.
type ServerInterface ¶
type ServerInterface interface { // List returns a list of thing // (GET /thing) List(ctx echo.Context, params ListParams) error // Create will create a new thing // (POST /thing) Create(ctx echo.Context) error // ListByExternalId returns a list of thing filtered by externalId // (GET /thing/by-external-id/{externalId}) ListByExternalId(ctx echo.Context, externalId int32, params ListByExternalIdParams) error // Count returns the number of thing based on search criterias // (GET /thing/count) Count(ctx echo.Context, params CountParams) error // List returns a geoJson of things found // (GET /thing/geojson) GeoJson(ctx echo.Context, params GeoJsonParams) error // Search returns a list of thing based on search criterias // (GET /thing/search) Search(ctx echo.Context, params SearchParams) error // Delete allows to delete a specific thingId // (DELETE /thing/{thingId}) Delete(ctx echo.Context, thingId openapi_types.UUID) error // Get will retrieve in backend all information about a specific thingId // (GET /thing/{thingId}) Get(ctx echo.Context, thingId openapi_types.UUID) error // Update allows to modify information about a specific thingId // (PUT /thing/{thingId}) Update(ctx echo.Context, thingId openapi_types.UUID) error // TypeThingList returns a list of types // (GET /types) TypeThingList(ctx echo.Context, params TypeThingListParams) error // TypeThingCreate will create a new group // (POST /types) TypeThingCreate(ctx echo.Context) error // Count returns the number of TypeThing based on search criterias // (GET /types/count) TypeThingCount(ctx echo.Context, params TypeThingCountParams) error // TypeThingDelete allows to delete a specific typeThingId // (DELETE /types/{typeThingId}) TypeThingDelete(ctx echo.Context, typeThingId int32) error // TypeThingGet will retrieve in backend all information about a specific typeThingId // (GET /types/{typeThingId}) TypeThingGet(ctx echo.Context, typeThingId int32) error // TypeThingUpdate allows to modify information about a specific typeThingId // (PUT /types/{typeThingId}) TypeThingUpdate(ctx echo.Context, typeThingId int32) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) Count ¶
func (w *ServerInterfaceWrapper) Count(ctx echo.Context) error
Count converts echo context to params.
func (*ServerInterfaceWrapper) Create ¶
func (w *ServerInterfaceWrapper) Create(ctx echo.Context) error
Create converts echo context to params.
func (*ServerInterfaceWrapper) Delete ¶
func (w *ServerInterfaceWrapper) Delete(ctx echo.Context) error
Delete converts echo context to params.
func (*ServerInterfaceWrapper) GeoJson ¶ added in v0.0.6
func (w *ServerInterfaceWrapper) GeoJson(ctx echo.Context) error
GeoJson converts echo context to params.
func (*ServerInterfaceWrapper) Get ¶
func (w *ServerInterfaceWrapper) Get(ctx echo.Context) error
Get converts echo context to params.
func (*ServerInterfaceWrapper) List ¶
func (w *ServerInterfaceWrapper) List(ctx echo.Context) error
List converts echo context to params.
func (*ServerInterfaceWrapper) ListByExternalId ¶
func (w *ServerInterfaceWrapper) ListByExternalId(ctx echo.Context) error
ListByExternalId converts echo context to params.
func (*ServerInterfaceWrapper) Search ¶
func (w *ServerInterfaceWrapper) Search(ctx echo.Context) error
Search converts echo context to params.
func (*ServerInterfaceWrapper) TypeThingCount ¶
func (w *ServerInterfaceWrapper) TypeThingCount(ctx echo.Context) error
TypeThingCount converts echo context to params.
func (*ServerInterfaceWrapper) TypeThingCreate ¶
func (w *ServerInterfaceWrapper) TypeThingCreate(ctx echo.Context) error
TypeThingCreate converts echo context to params.
func (*ServerInterfaceWrapper) TypeThingDelete ¶
func (w *ServerInterfaceWrapper) TypeThingDelete(ctx echo.Context) error
TypeThingDelete converts echo context to params.
func (*ServerInterfaceWrapper) TypeThingGet ¶
func (w *ServerInterfaceWrapper) TypeThingGet(ctx echo.Context) error
TypeThingGet converts echo context to params.
func (*ServerInterfaceWrapper) TypeThingList ¶
func (w *ServerInterfaceWrapper) TypeThingList(ctx echo.Context) error
TypeThingList converts echo context to params.
func (*ServerInterfaceWrapper) TypeThingUpdate ¶
func (w *ServerInterfaceWrapper) TypeThingUpdate(ctx echo.Context) error
TypeThingUpdate converts echo context to params.
func (*ServerInterfaceWrapper) Update ¶
func (w *ServerInterfaceWrapper) Update(ctx echo.Context) error
Update converts echo context to params.
type Service ¶
type Service struct { Log golog.MyLogger DbConn database.DB Store Storage Server *goHttpEcho.Server ListDefaultLimit int }
func (Service) Count ¶
func (s Service) Count(ctx echo.Context, params CountParams) error
Count returns the number of things found after filtering data with any given CountParams curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" 'http://localhost:9090/goapi/v1/thing/count' |jq
func (Service) Create ¶
Create allows to insert a new thing curl -s -XPOST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"id": "3999971f-53d7-4eb6-8898-97f257ea5f27","type_id": 3,"name": "Gil-Parcelle","description": "just a nice parcelle test","external_id": 345678912,"inactivated": false,"managed_by": 999, "more_data": NULL,"pos_x":2537603.0 ,"pos_y":1152613.0 }' 'http://localhost:9090/goapi/v1/thing'
func (Service) Delete ¶
Delete will remove the given thingId entry from the store, and if not present will return 400 Bad Request curl -v -XDELETE -H "Content-Type: application/json" -H "Authorization: Bearer $token" 'http://localhost:8888/api/users/3' -> 204 No Content if present and delete it curl -v -XDELETE -H "Content-Type: application/json" -H "Authorization: Bearer $token" 'http://localhost:8888/users/93333' -> 400 Bad Request
func (Service) GeoJson ¶ added in v0.0.6
func (s Service) GeoJson(ctx echo.Context, params GeoJsonParams) error
func (Service) Get ¶
Get will retrieve the Thing with the given id in the store and return it curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" 'http://localhost:9090/goapi/v1/thing/9999971f-53d7-4eb6-8898-97f257ea5f27' |jq
func (Service) List ¶
func (s Service) List(ctx echo.Context, params ListParams) error
List sends a list of things in the store based on the given parameters filters curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" 'http://localhost:9090/goapi/v1/thing?limit=3&ofset=0' |jq curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" 'http://localhost:9090/goapi/v1/thing?limit=3&type=112' |jq
func (Service) ListByExternalId ¶
func (s Service) ListByExternalId(ctx echo.Context, externalId int32, params ListByExternalIdParams) error
ListByExternalId sends a list of things in the store as json based of the given filters curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" 'http://localhost:9090/goapi/v1/thing/by-external-id/345678912?limit=3&ofset=0' |jq
func (Service) Search ¶
func (s Service) Search(ctx echo.Context, params SearchParams) error
Search returns a list of things in the store as json based of the given search criteria curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" 'http://localhost:9090/goapi/v1/thing/search?limit=3&ofset=0' |jq curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" 'http://localhost:9090/goapi/v1/thing/search?limit=3&type=112' |jq
func (Service) TypeThingCount ¶
func (s Service) TypeThingCount(ctx echo.Context, params TypeThingCountParams) error
func (Service) TypeThingCreate ¶
TypeThingCreate will insert a new TypeThing in the store
func (Service) TypeThingDelete ¶
TypeThingDelete will remove the given TypeThing entry from the store, and if not present will return 400 Bad Request
func (Service) TypeThingGet ¶
TypeThingGet will retrieve the Thing with the given id in the store and return it
func (Service) TypeThingList ¶
func (s Service) TypeThingList(ctx echo.Context, params TypeThingListParams) error
TypeThingList sends a list of TypeThing based on the given TypeThingListParams parameters filters
func (Service) TypeThingUpdate ¶
func (Service) Update ¶
Update will change the attributes values for the thing identified by the given thingId curl -s -XPUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"id": "3999971f-53d7-4eb6-8898-97f257ea5f27","type_id": 3,"name": "Gil-Parcelle","description": "just a nice parcelle test by GIL","external_id": 345678912,"inactivated": false,"managed_by": 999, "more_data": {"info_value": 3230 },"pos_x":2537603.0 ,"pos_y":1152613.0 }' 'http://localhost:9090/goapi/v1/thing/3999971f-53d7-4eb6-8898-97f257ea5f27' |jq
type Storage ¶
type Storage interface { // GeoJson returns a geoJson of existing things with the given offset and limit. GeoJson(offset, limit int, params GeoJsonParams) (string, error) // List returns the list of existing things with the given offset and limit. List(offset, limit int, params ListParams) ([]*ThingList, error) // ListByExternalId returns the list of existing things having the given externalId with the given offset and limit. ListByExternalId(offset, limit int, externalId int) ([]*ThingList, error) // Search returns the list of existing things filtered by search params with the given offset and limit. Search(offset, limit int, params SearchParams) ([]*ThingList, error) // Get returns the thing with the specified things ID. Get(id uuid.UUID) (*Thing, error) // Exist returns true only if a things with the specified id exists in store. Exist(id uuid.UUID) bool // Count returns the total number of things. Count(params CountParams) (int32, error) // Create saves a new things in the storage. Create(thing Thing) (*Thing, error) // Update updates the things with given ID in the storage. Update(id uuid.UUID, thing Thing) (*Thing, error) // Delete removes the things with given ID from the storage. Delete(id uuid.UUID, userId int32) error // IsThingActive returns true if the thing with the specified id has the inactivated attribute set to false IsThingActive(id uuid.UUID) bool // IsUserOwner returns true only if userId is the creator of the record (owner) of this thing in store. IsUserOwner(id uuid.UUID, userId int32) bool // CreateTypeThing saves a new typeThing in the storage. CreateTypeThing(typeThing TypeThing) (*TypeThing, error) // UpdateTypeThing updates the typeThing with given ID in the storage. UpdateTypeThing(id int32, typeThing TypeThing) (*TypeThing, error) // DeleteTypeThing removes the typeThing with given ID from the storage. DeleteTypeThing(id int32, userId int32) error // ListTypeThing returns the list of active typeThings with the given offset and limit. ListTypeThing(offset, limit int, params TypeThingListParams) ([]*TypeThingList, error) // GetTypeThing returns the typeThing with the specified things ID. GetTypeThing(id int32) (*TypeThing, error) // CountTypeThing returns the number of TypeThing based on search criteria CountTypeThing(params TypeThingCountParams) (int32, error) }
Storage is an interface to different implementation of persistence for Things/TypeThing
func GetStorageInstanceOrPanic ¶ added in v0.1.1
type Thing ¶
type Thing struct { BuildAt *time.Time `json:"build_at,omitempty"` Comment *string `json:"comment,omitempty"` ContainedBy *string `json:"contained_by,omitempty"` ContainedByOld *int32 `json:"contained_by_old,omitempty"` // CreatedAt date de création de cet enregistrement dans la base CreatedAt *time.Time `json:"created_at,omitempty"` // CreatedBy identifiant de l'utilisateur ayant créé cet enregistrement CreatedBy int32 `json:"created_by"` // Deleted cet enregisrement a été marqué comme effacé Deleted bool `json:"deleted"` // DeletedAt date à laquelle cet enregisrement a été marqué comme effacé DeletedAt *time.Time `json:"deleted_at,omitempty"` // DeletedBy utilisateur ayant demandé de marquer cet enregisrement comme effacé DeletedBy *int32 `json:"deleted_by,omitempty"` Description *string `json:"description,omitempty"` ExternalId *int32 `json:"external_id,omitempty"` ExternalRef *string `json:"external_ref,omitempty"` // Id cet Universally unique identifier (UUID) sera généré automatiquement pour vous Id openapi_types.UUID `json:"id"` Inactivated bool `json:"inactivated"` InactivatedBy *int32 `json:"inactivated_by,omitempty"` InactivatedReason *string `json:"inactivated_reason,omitempty"` InactivatedTime *time.Time `json:"inactivated_time,omitempty"` // LastModifiedAt date de la dernière modication de cet enregistrement LastModifiedAt *time.Time `json:"last_modified_at,omitempty"` // LastModifiedBy utilisateur ayant effectué la dernière modication de cet enregistrement LastModifiedBy *int32 `json:"last_modified_by,omitempty"` ManagedBy *int32 `json:"managed_by,omitempty"` // MoreData permet de stocker des attributs complémentaires au format json MoreData *map[string]interface{} `json:"more_data,omitempty"` Name string `json:"name"` PosX float64 `json:"pos_x"` PosY float64 `json:"pos_y"` Status *ThingStatus `json:"status,omitempty"` // TypeId FK sur la clé primaire du TypeThing de cet objet TypeId int32 `json:"type_id"` Validated *bool `json:"validated,omitempty"` ValidatedBy *int32 `json:"validated_by,omitempty"` ValidatedTime *time.Time `json:"validated_time,omitempty"` }
Thing defines model for Thing.
type ThingList ¶
type ThingList struct { CreatedAt *time.Time `json:"created_at,omitempty"` CreatedBy int32 `json:"created_by"` Description *string `json:"description,omitempty"` ExternalId *int32 `json:"external_id,omitempty"` Id openapi_types.UUID `json:"id"` Inactivated bool `json:"inactivated"` Name string `json:"name"` PosX float64 `json:"pos_x"` PosY float64 `json:"pos_y"` Status *ThingStatus `json:"status,omitempty"` TypeId int32 `json:"type_id"` Validated *bool `json:"validated,omitempty"` }
ThingList defines model for ThingList.
type ThingStatus ¶
type ThingStatus string
ThingStatus defines model for ThingStatus.
const ( Abandonné ThingStatus = "Abandonné" Démoli ThingStatus = "Démoli" EnConstruction ThingStatus = "En Construction" Planifié ThingStatus = "Planifié" Utilisé ThingStatus = "Utilisé" )
Defines values for ThingStatus.
type TypeThing ¶
type TypeThing struct { Comment *string `json:"comment,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` CreatedBy int32 `json:"created_by"` Deleted bool `json:"deleted"` DeletedAt *time.Time `json:"deleted_at,omitempty"` DeletedBy *int32 `json:"deleted_by,omitempty"` Description *string `json:"description,omitempty"` ExternalId *int32 `json:"external_id,omitempty"` GeometryType *string `json:"geometry_type,omitempty"` IconPath string `json:"icon_path"` Id int32 `json:"id"` Inactivated bool `json:"inactivated"` InactivatedBy *int32 `json:"inactivated_by,omitempty"` InactivatedReason *string `json:"inactivated_reason,omitempty"` InactivatedTime *time.Time `json:"inactivated_time,omitempty"` LastModifiedAt *time.Time `json:"last_modified_at,omitempty"` LastModifiedBy *int32 `json:"last_modified_by,omitempty"` ManagedBy *int32 `json:"managed_by,omitempty"` MoreDataSchema *map[string]interface{} `json:"more_data_schema,omitempty"` Name string `json:"name"` TableName *string `json:"table_name,omitempty"` }
TypeThing defines model for TypeThing.
type TypeThingCountParams ¶
type TypeThingCountParams struct { // Keywords text keywords to filter the TypeThing count Keywords *string `form:"keywords,omitempty" json:"keywords,omitempty"` // CreatedBy id of the creator to filter the TypeThing count CreatedBy *int32 `form:"created_by,omitempty" json:"created_by,omitempty"` // Inactivated inactivated flag to filter the TypeThing count to return Inactivated *bool `form:"inactivated,omitempty" json:"inactivated,omitempty"` }
TypeThingCountParams defines parameters for TypeThingCount.
type TypeThingCreateJSONRequestBody ¶
type TypeThingCreateJSONRequestBody = TypeThing
TypeThingCreateJSONRequestBody defines body for TypeThingCreate for application/json ContentType.
type TypeThingList ¶
type TypeThingList struct { CreatedAt time.Time `json:"created_at"` ExternalId *int32 `json:"external_id,omitempty"` GeometryType *string `json:"geometry_type,omitempty"` IconPath string `json:"icon_path"` Id int32 `json:"id"` Inactivated bool `json:"inactivated"` Name string `json:"name"` TableName *string `json:"table_name,omitempty"` }
TypeThingList defines model for TypeThingList.
type TypeThingListParams ¶
type TypeThingListParams struct { // Keywords text keywords to filter the things to return Keywords *string `form:"keywords,omitempty" json:"keywords,omitempty"` // CreatedBy id of the creator to filter by the things to return CreatedBy *int32 `form:"created_by,omitempty" json:"created_by,omitempty"` // ExternalId id of the external id to filter by the things to return ExternalId *int32 `form:"external_id,omitempty" json:"external_id,omitempty"` // Inactivated inactivated flag to filter the things to return Inactivated *bool `form:"inactivated,omitempty" json:"inactivated,omitempty"` // Limit maximum number of results to return Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"` // Offset offset rows to skip before returning rows Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"` }
TypeThingListParams defines parameters for TypeThingList.
type TypeThingUpdateFormdataRequestBody ¶ added in v0.0.10
type TypeThingUpdateFormdataRequestBody = TypeThing
TypeThingUpdateFormdataRequestBody defines body for TypeThingUpdate for application/x-www-form-urlencoded ContentType.
type UpdateFormdataRequestBody ¶ added in v0.0.10
type UpdateFormdataRequestBody = Thing
UpdateFormdataRequestBody defines body for Update for application/x-www-form-urlencoded ContentType.