cmsintsetup

package
v0.0.0-...-46e3884 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyRelatedDatasetItems

func CopyRelatedDatasetItems(ctx context.Context, s *Services, opts CopyRelatedItemsOpts) error

func Handler

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

func SetupCityItems

func SetupCityItems(ctx context.Context, s *Services, inp SetupCityItemsInput, onprogress func(i, l int, c SetupCSVItem)) error

func SetupCityModel

func SetupCityModel(ctx context.Context, s *Services, i SetupConfig) error

func SetupEmptyCityModel

func SetupEmptyCityModel(ctx context.Context, s *Services, i SetupConfig) error

func SetupFeatureModel

func SetupFeatureModel(ctx context.Context, s *Services, i SetupConfig) error

func SetupGenericModel

func SetupGenericModel(ctx context.Context, s *Services, i SetupConfig) error

func SetupGeospatialjpDataModel

func SetupGeospatialjpDataModel(ctx context.Context, s *Services, i SetupConfig) error

func SetupGeospatialjpIndexModel

func SetupGeospatialjpIndexModel(ctx context.Context, s *Services, i SetupConfig) error

func SetupModels

func SetupModels(ctx context.Context, s *Services, i SetupConfig) error

func SetupPlateauModels

func SetupPlateauModels(ctx context.Context, s *Services, i SetupConfig) error

func SetupRelatedModel

func SetupRelatedModel(ctx context.Context, s *Services, i SetupConfig) error

func SetupSystemModel

func SetupSystemModel(ctx context.Context, s *Services, i SetupConfig) error

func SetupTilesModel

func SetupTilesModel(ctx context.Context, s *Services, i SetupConfig) error

Types

type Config

type Config struct {
	Token            string
	CMSURL           string
	CMSToken         string
	CMSSystemProject string
}

type CopyRelatedItemsOpts

type CopyRelatedItemsOpts struct {
	FromProject   string `json:"fromProject"`
	ToProject     string `json:"toProject"`
	Offset        int    `json:"offset"`
	Limit         int    `json:"limit"`
	DryRun        bool   `json:"dryRun"`
	Force         bool   `json:"force"`
	CacheBasePath string `json:"-"`
}

type PlateauCMS

type PlateauCMS struct {
	CMS cms.Interface
	// contains filtered or unexported fields
}

func NewPlateauCMS

func NewPlateauCMS(cms cms.Interface, cacheBasePath string) *PlateauCMS

func (*PlateauCMS) GetAllCities

func (c *PlateauCMS) GetAllCities(ctx context.Context, prj string, featureTypes []string) ([]*cmsintegrationcommon.CityItem, error)

func (*PlateauCMS) GetAllRelated

func (c *PlateauCMS) GetAllRelated(ctx context.Context, prj string, relatedDataTypes []string) ([]*cmsintegrationcommon.RelatedItem, error)

type Services

type Services struct {
	CMS        cms.Interface
	PCMS       plateaucms.FeatureTypeStore
	PlateauCMS *PlateauCMS
	HTTP       *http.Client
}

func NewServices

func NewServices(conf Config) (*Services, error)

func (*Services) GET

func (s *Services) GET(ctx context.Context, url string) (io.ReadCloser, error)

func (*Services) GETAsBytes

func (s *Services) GETAsBytes(ctx context.Context, url string) ([]byte, error)

type SetupCSVItem

type SetupCSVItem struct {
	Prefecture string   `json:"pref"`
	Name       string   `json:"city"`
	NameEn     string   `json:"city_en"`
	Code       string   `json:"city_code"`
	Features   []string `json:"features"`
}

type SetupCityItemsInput

type SetupCityItemsInput struct {
	ProjectID string    `json:"projectId"`
	DataURL   string    `json:"dataUrl"`
	DataBody  io.Reader `json:"-"`
	Force     bool      `json:"force"`
	Offset    int       `json:"offset"`
	Limit     int       `json:"limit"`
	DryRun    bool      `json:"dryrun"`
}

type SetupConfig

type SetupConfig struct {
	Type    string `json:"type"`
	Project string `json:"project"`
}

Jump to

Keyboard shortcuts

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