sdkapiv3

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

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

Types

type APIClient

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

func NewAPIClient

func NewAPIClient(conf Config) (*APIClient, error)

func (*APIClient) QueryDatasetFiles

func (c *APIClient) QueryDatasetFiles(ctx context.Context, id string) (DatasetFilesResponse, error)

func (*APIClient) QueryDatasets

func (c *APIClient) QueryDatasets(ctx context.Context) (DatasetsQuery, error)

type Config

type Config struct {
	DataCatagloAPIURL   string
	DataCatalogAPIToken string
	Token               string
}

type DatasetCityResponse

type DatasetCityResponse struct {
	ID           string   `json:"id"`
	Title        string   `json:"title"`
	Spec         string   `json:"spec"`
	Description  string   `json:"description"`
	FeatureTypes []string `json:"featureTypes"`
}

type DatasetFilesResponse

type DatasetFilesResponse map[string][]DatasetFilesResponseItem

type DatasetFilesResponseItem

type DatasetFilesResponseItem struct {
	Code   string `json:"code"`
	MaxLod int    `json:"maxLod"`
	URL    string `json:"url"`
}

type DatasetPrefectureResponse

type DatasetPrefectureResponse struct {
	ID    string                 `json:"id"`
	Title string                 `json:"title"`
	Data  []*DatasetCityResponse `json:"data"`
}

type DatasetsQuery

type DatasetsQuery struct {
	Areas []QueryArea `graphql:"areas(input: {areaTypes: PREFECTURE})"`
}

func (*DatasetsQuery) ToDatasets

func (d *DatasetsQuery) ToDatasets() *DatasetsResponse

type DatasetsResponse

type DatasetsResponse struct {
	Data []*DatasetPrefectureResponse `json:"data"`
}

type QueryArea

type QueryArea struct {
	ID         graphql.String
	Name       graphql.String
	Code       graphql.String
	Prefecture QueryPrefecture `graphql:"... on Prefecture"`
}

type QueryCity

type QueryCity struct {
	ID       graphql.String
	Name     graphql.String
	Code     graphql.String
	Datasets []QueryDataset `graphql:"datasets(input: {includeTypes: [\"bldg\"]})"`
	Citygml  *QueryCityCityGML
}

type QueryCityCityGML

type QueryCityCityGML struct {
	FeatureTypes     []graphql.String
	PlateauSpecMinor QueryPlateauSpecMinor
}

type QueryDataset

type QueryDataset struct {
	ID          graphql.String
	Name        graphql.String
	TypeCode    graphql.String
	Description graphql.String
}

type QueryPlateauSpecMinor

type QueryPlateauSpecMinor struct {
	Version graphql.String
}

type QueryPrefecture

type QueryPrefecture struct {
	Cities []QueryCity
}

Jump to

Keyboard shortcuts

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