Documentation ¶
Index ¶
- Variables
- func Handler(conf Config, g *echo.Group) error
- func SetupCityItems(ctx context.Context, s *Services, inp SetupCityItemsInput, ...) error
- func WebhookHandler(conf Config) (cmswebhook.Handler, error)
- type CityItem
- type Config
- type ConvertionStatus
- type FeatureItem
- type FeatureItemDatum
- type GenericItem
- type GenericItemDataset
- type GeospatialjpDataItem
- type GeospatialjpIndexItem
- type ManagementStatus
- type RelatedItem
- type RelatedItemDatum
- type Services
- func (s *Services) DownloadAsset(ctx context.Context, assetID string) (io.ReadCloser, error)
- func (s *Services) DownloadAssetAsBytes(ctx context.Context, assetID string) ([]byte, error)
- func (s *Services) GET(ctx context.Context, url string) (io.ReadCloser, error)
- func (s *Services) GETAsBytes(ctx context.Context, url string) ([]byte, error)
- func (s *Services) GetMainItemWithMetadata(ctx context.Context, i *cms.Item) (_ *cms.Item, err error)
- func (s *Services) UpdateFeatureItemStatus(ctx context.Context, itemID string, convType fmeRequestType, ...) error
- func (s *Services) UploadAsset(ctx context.Context, pid, url string) (_ string, err error)
- type SetupCSVItem
- type SetupCityItemsInput
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidFMEID = errors.New("invalid fme id")
Functions ¶
func SetupCityItems ¶
func SetupCityItems(ctx context.Context, s *Services, inp SetupCityItemsInput, onprogress func(i, l int, c SetupCSVItem)) error
func WebhookHandler ¶
func WebhookHandler(conf Config) (cmswebhook.Handler, error)
Types ¶
type CityItem ¶
type CityItem struct { ID string `json:"id,omitempty" cms:"id"` Prefecture string `json:"prefecture,omitempty" cms:"prefecture,select"` CityName string `json:"city_name,omitempty" cms:"city_name,text"` CityNameEn string `json:"city_name_en,omitempty" cms:"city_name_en,text"` CityCode string `json:"city_code,omitempty" cms:"city_code,text"` SpecificationVersion string `json:"spec,omitempty" cms:"spec,select"` OpenDataUrl string `json:"open_data_url,omitempty" cms:"open_data_url,url"` PRCS cmsintegrationcommon.PRCS `json:"prcs,omitempty" cms:"prcs,select"` CodeLists string `json:"codelists,omitempty" cms:"codelists,asset"` Schemas string `json:"schemas,omitempty" cms:"schemas,asset"` Metadata string `json:"metadata,omitempty" cms:"metadata,asset"` Specification string `json:"specification,omitempty" cms:"specification,asset"` References map[string]string `json:"references,omitempty" cms:"-"` RelatedDataset string `json:"related_dataset,omitempty" cms:"related_dataset,reference"` GeospatialjpIndex string `json:"geospatialjp-index,omitempty" cms:"geospatialjp-index,reference"` GeospatialjpData string `json:"geospatialjp-data,omitempty" cms:"geospatialjp-data,reference"` // meatadata PlateauDataStatus string `json:"plateau_data_status,omitempty" cms:"plateau_data_status,select,metadata"` CityPublic bool `json:"city_public,omitempty" cms:"city_public,bool,metadata"` SDKPublic bool `json:"sdk_public,omitempty" cms:"sdk_public,bool,metadata"` Public map[string]bool `json:"public,omitempty" cms:"-"` }
func CityItemFrom ¶
type Config ¶
type Config = cmsintegrationcommon.Config
type ConvertionStatus ¶
type ConvertionStatus string
const ( ConvertionStatusNotStarted ConvertionStatus = "未実行" ConvertionStatusRunning ConvertionStatus = "実行中" ConvertionStatusError ConvertionStatus = "エラー" ConvertionStatusSuccess ConvertionStatus = "成功" )
func (ConvertionStatus) String ¶
func (s ConvertionStatus) String() string
type FeatureItem ¶
type FeatureItem struct { ID string `json:"id,omitempty" cms:"id"` City string `json:"city,omitempty" cms:"city,reference"` CityGML string `json:"citygml,omitempty" cms:"citygml,asset"` Data []string `json:"data,omitempty" cms:"data,asset"` Desc string `json:"desc,omitempty" cms:"desc,textarea"` Items []FeatureItemDatum `json:"items,omitempty" cms:"items,group"` QCResult string `json:"qcresult,omitempty" cms:"qc_result,asset"` SearchIndex string `json:"search_index,omitempty" cms:"search_index,asset"` Dic string `json:"dic,omitempty" cms:"dic,textarea"` MaxLOD string `json:"maxlod,omitempty" cms:"maxlod,asset"` // metadata SkipQCConv *cms.Tag `json:"skip_qc_conv,omitempty" cms:"skip_qc_conv,tag,metadata"` Status *cms.Tag `json:"status,omitempty" cms:"status,select,metadata"` ConvertionStatus *cms.Tag `json:"conv_status,omitempty" cms:"conv_status,tag,metadata"` QCStatus *cms.Tag `json:"qc_status,omitempty" cms:"qc_status,tag,metadata"` // compat SkipQC bool `json:"skip_qc,omitempty" cms:"skip_qc,bool,metadata"` SkipConvert bool `json:"skip_conv,omitempty" cms:"skip_conv,bool,metadata"` }
func FeatureItemFrom ¶
func FeatureItemFrom(item *cms.Item) (i *FeatureItem)
func (*FeatureItem) CMSItem ¶
func (i *FeatureItem) CMSItem() *cms.Item
type FeatureItemDatum ¶
type GenericItem ¶
type GenericItem struct { ID string `json:"id,omitempty" cms:"id"` City string `json:"city,omitempty" cms:"city,reference"` Name string `json:"name,omitempty" cms:"name,text"` Type string `json:"type,omitempty" cms:"type,text"` TypeEn string `json:"type_en,omitempty" cms:"type_en,text"` Datasets []GenericItemDataset `json:"datasets,omitempty" cms:"datasets,group"` OpenDataUrl string `json:"open-data-url,omitempty" cms:"open_data_url,url"` Year string `json:"year,omitempty" cms:"year,select"` // metadata Public bool `json:"public,omitempty" cms:"public,bool,metadata"` UseAR bool `json:"use-ar,omitempty" cms:"use-ar,bool,metadata"` }
func GenericItemFrom ¶
func GenericItemFrom(item *cms.Item) (i *GenericItem)
func (*GenericItem) CMSItem ¶
func (i *GenericItem) CMSItem() *cms.Item
type GenericItemDataset ¶
type GenericItemDataset struct { ID string `json:"id,omitempty" cms:"id"` Data string `json:"data,omitempty" cms:"data,asset"` Desc string `json:"desc,omitempty" cms:"desc,textarea"` DataURL string `json:"url,omitempty" cms:"data_url,url"` DataFormat string `json:"data-format,omitempty" cms:"data_format,select"` LayerName string `json:"layer-name,omitempty" cms:"layer_name,text"` }
type GeospatialjpDataItem ¶
type GeospatialjpDataItem struct { ID string `json:"id,omitempty" cms:"id"` City string `json:"city,omitempty" cms:"city,reference"` CityGML string `json:"citygml,omitempty" cms:"citygml,asset"` PlateauData string `json:"converted-data,omitempty" cms:"plateau_data,asset"` RelatedData string `json:"related-data,omitempty" cms:"related_data,asset"` GenericData string `json:"generic-data,omitempty" cms:"generic_data,asset"` // metadata CityGMLMergeStatus ConvertionStatus `json:"citygml_merge_status,omitempty" cms:"citygml_merge_status,select,metadata"` ConvertedDataMergeSatatus ConvertionStatus `json:"plateau_merge_status,omitempty" cms:"plateau_merge_status,select,metadata"` RelatedDataMergeStatus ConvertionStatus `json:"related_merge_status,omitempty" cms:"related_merge_status,select,metadata"` }
func GeospatialjpDataItemFrom ¶
func GeospatialjpDataItemFrom(item *cms.Item) (i *GeospatialjpDataItem)
func (*GeospatialjpDataItem) CMSItem ¶
func (i *GeospatialjpDataItem) CMSItem() *cms.Item
type GeospatialjpIndexItem ¶
type GeospatialjpIndexItem struct { ID string `json:"id,omitempty" cms:"id"` City string `json:"city,omitempty" cms:"city,reference"` Title string `json:"title,omitempty" cms:"title,text"` Desc string `json:"desc,omitempty" cms:"desc,markdown"` Region string `json:"region,omitempty" cms:"region,text"` Thumbnail string `json:"thumbnail,omitempty" cms:"thumbnail,asset"` // metadata Status ManagementStatus `json:"status,omitempty" cms:"status,select,metadata"` }
func GeospatialjpIndexItemFrom ¶
func GeospatialjpIndexItemFrom(item *cms.Item) (i *GeospatialjpIndexItem)
func (*GeospatialjpIndexItem) CMSItem ¶
func (i *GeospatialjpIndexItem) CMSItem() *cms.Item
type ManagementStatus ¶
type ManagementStatus string
const ( ManagementStatusNotStarted ManagementStatus = "登録未着手" ManagementStatusRunning ManagementStatus = "新規登録中" ManagementStatusSkip ManagementStatus = "対象外" ManagementStatusDone ManagementStatus = "登録済み" ManagementStatusReady ManagementStatus = "確認可能" )
func (ManagementStatus) String ¶
func (s ManagementStatus) String() string
type RelatedItem ¶
type RelatedItem struct { ID string `json:"id,omitempty" cms:"id"` City string `json:"city,omitempty" cms:"city,reference"` Items map[string]RelatedItemDatum `json:"items,omitempty" cms:"-"` Merged string `json:"merged,omitempty" cms:"merged,asset"` // metadata ConvertStatus map[string]*cms.Tag `json:"conv_status,omitempty" cms:"-"` MergeStatus *cms.Tag `json:"merge_status,omitempty" cms:"merge_status,tag,metadata"` Merge bool `json:"merge,omitempty" cms:"merge,bool,metadata"` }
func RelatedItemFrom ¶
func RelatedItemFrom(item *cms.Item) (i *RelatedItem)
func (*RelatedItem) CMSItem ¶
func (i *RelatedItem) CMSItem() *cms.Item
type RelatedItemDatum ¶
type Services ¶
func NewServices ¶
func (*Services) DownloadAsset ¶
func (*Services) DownloadAssetAsBytes ¶
func (*Services) GETAsBytes ¶
func (*Services) GetMainItemWithMetadata ¶
func (*Services) UpdateFeatureItemStatus ¶
type SetupCSVItem ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.