datacatalogv2

package
v0.0.0-...-e9a8072 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const ModelDataset = "dataset"
View Source
const ModelPlateau = "plateau"
View Source
const ModelUsecase = "usecase"

Variables

This section is empty.

Functions

func Echo

func Echo(conf Config, g *echo.Group) error

Types

type Config

type Config struct {
	plateaucms.Config
	DisableCache bool
	CacheTTL     int
}

type DataCatalogGroup

type DataCatalogGroup struct {
	ID         string `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	Prefecture string `json:"pref,omitempty"`
	City       string `json:"city,omitempty"`
	CityEn     string `json:"cityEn,omitempty"`
	Type       string `json:"type,omitempty"`
	Children   []any  `json:"children"`
}

type DataCatalogItem

type DataCatalogItem struct {
	ID             string                                 `json:"id,omitempty"`
	ItemID         string                                 `json:"itemId,omitempty"`
	Name           string                                 `json:"name,omitempty"`
	Pref           string                                 `json:"pref,omitempty"`
	PrefCode       string                                 `json:"pref_code,omitempty"`
	City           string                                 `json:"city,omitempty"`
	CityEn         string                                 `json:"city_en,omitempty"`
	CityCode       string                                 `json:"city_code,omitempty"`
	Ward           string                                 `json:"ward,omitempty"`
	WardEn         string                                 `json:"ward_en,omitempty"`
	WardCode       string                                 `json:"ward_code,omitempty"`
	Type           string                                 `json:"type,omitempty"`
	Type2          string                                 `json:"type2,omitempty"`
	TypeEn         string                                 `json:"type_en,omitempty"`
	Type2En        string                                 `json:"type2_en,omitempty"`
	Format         string                                 `json:"format,omitempty"`
	Layers         []string                               `json:"layers,omitempty"`
	URL            string                                 `json:"url,omitempty"`
	Description    string                                 `json:"desc,omitempty"`
	SearchIndex    string                                 `json:"search_index,omitempty"`
	Year           int                                    `json:"year,omitempty"`
	PRCS           cmsintegrationcommon.PRCS              `json:"prcs,omitempty"`
	OpenDataURL    string                                 `json:"openDataUrl,omitempty"`
	Config         *datacatalogutil.DataCatalogItemConfig `json:"config,omitempty"`
	Order          *int                                   `json:"order,omitempty"`
	OriginalURL    string                                 `json:"original_url,omitempty"`
	OriginalFormat string                                 `json:"original_format,omitempty"`
	// force not creatign a type folder
	Root bool `json:"root,omitempty"`
	// force creating folder on root
	RootType bool   `json:"root_type,omitempty"`
	Group    string `json:"group,omitempty"`
	Infobox  bool   `json:"infobox,omitempty"`
	// alias of type that is used as a folder name
	Category string `json:"category,omitempty"`
	// internal
	Spec                string   `json:"-"`
	Family              string   `json:"-"`
	Edition             string   `json:"-"`
	CityGMLURL          string   `json:"-"`
	CityGMLAssetID      string   `json:"-"`
	CityGMLFeatureTypes []string `json:"-"`
	MaxLODURL           string   `json:"-"`
	SDKPublic           bool     `json:"-"`
}

func (DataCatalogItem) ConfigItems

func (DataCatalogItem) MainConfigItem

func (DataCatalogItem) MainOrConfigItems

type DatasetItem

type DatasetItem plateauv2.DatasetItem

Currently this is almost the same as UseCaseItem

func (DatasetItem) DataCatalogs

func (i DatasetItem) DataCatalogs() []DataCatalogItem

func (DatasetItem) GetCityName

func (i DatasetItem) GetCityName() string

type Fetchable

type Fetchable interface {
	Do(ctx context.Context, project string, opts FetcherDoOptions) (ResponseAll, error)
}

type Fetcher

type Fetcher struct {
	// contains filtered or unexported fields
}

func NewFetcher

func NewFetcher(cmsbase string) (*Fetcher, error)

func (*Fetcher) Clone

func (f *Fetcher) Clone() *Fetcher

func (*Fetcher) Do

func (f *Fetcher) Do(ctx context.Context, project string, opts FetcherDoOptions) (ResponseAll, error)

type FetcherDoOptions

type FetcherDoOptions struct {
	Subproject string
	CityName   string
}

type ItemCommon

type ItemCommon interface {
	GetCityName() string
	DataCatalogs() []DataCatalogItem
}

type PlateauItem

type PlateauItem plateauv2.CMSItem

func (PlateauItem) DataCatalogs

func (i PlateauItem) DataCatalogs() []DataCatalogItem

func (PlateauItem) GetCityName

func (i PlateauItem) GetCityName() string

type ResponseAll

type ResponseAll struct {
	Plateau []PlateauItem
	Dataset []DatasetItem
	Usecase []UsecaseItem
}

func (ResponseAll) All

func (d ResponseAll) All() []DataCatalogItem

func (ResponseAll) DatasetItems

func (d ResponseAll) DatasetItems() []DataCatalogItem

func (ResponseAll) PlateauItems

func (d ResponseAll) PlateauItems() []DataCatalogItem

func (ResponseAll) UsecaseItems

func (d ResponseAll) UsecaseItems() []DataCatalogItem

type UsecaseItem

type UsecaseItem struct {
	ID          string           `json:"id,omitempty"`
	Name        string           `json:"name,omitempty"`
	Prefecture  string           `json:"prefecture,omitempty"`
	CityName    string           `json:"city_name,omitempty"`
	WardName    string           `json:"ward_name,omitempty"`
	OpenDataURL string           `json:"opendata_url,omitempty"`
	Description string           `json:"description,omitempty"`
	Year        string           `json:"year,omitempty"`
	Data        *cms.PublicAsset `json:"data,omitempty"`
	DataFormat  string           `json:"data_format,omitempty"`
	DataURL     string           `json:"data_url,omitempty"`
	DataLayers  string           `json:"data_layer,omitempty"`
	Config      string           `json:"config,omitempty"`
	Order       *int             `json:"order,omitempty"`
	Category    string           `json:"category,omitempty"`
	Type        string           `json:"type,omitempty"`
	TypeEn      string           `json:"type_en,omitempty"`
	Infobox     bool             `json:"infobox,omitempty"`
}

func (UsecaseItem) DataCatalogs

func (i UsecaseItem) DataCatalogs() []DataCatalogItem

func (UsecaseItem) GetCityName

func (i UsecaseItem) GetCityName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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