area-service

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MulanPSL-2.0 Imports: 6 Imported by: 0

README

English | 简体中文

What is area service

Area service is administrative region code service.

Based on Amap Implementation.

Quick start

Configure

config.yml

mode: TEST
debug: true
amapKey: <set you amap key>
autoFreshTime: 00:00:00
http:
  enable: true
  port: 10011
grpc:
  enable: true
  port: 10012

Run by Golang

git clone https://github.com/niubir/area-service && cd area-service
CONFIG_DIR='you config.yml path' go run main.go

Run by Docker

docker pull niubir/area-service:latest
docker run -p 10011:10011 -p 10012:10012 -v <you config.yml path>/config:/config -d niubir/area-service:latest

Usage

http

swgger http://localhost:10011/swagger/index.html

grpc

proto https://github.com/niubir/area-service/blob/main/grpc/area.proto

cli

git clone https://github.com/niubir/area-service-client

Configuration option(config.yml)

Option Default Description
mode PRODUCTION system mode(PRODUCTION,TEST,DEVELOPMENT)
logLevel false log level(DEBUG,INFO,WARN,ERROR)
amapKey - Amap App
autoFreshTime - at what time does the automatic fresh of area every day, for example:00:00:00
http.enable true enable http
http.debug false enable http debug
http.port 10011 http port
grpc.enable true enable grpc
grpc.debug false enable grpc debug
grpc.port 10012 grpc port

Env option

Option Default Description
CONFIG_DIR /config config dir
CONFIG_FILENAME config.yml config filename
LOG_DIR /logs log dir
AREA_DIR /data area dir

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
docs
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag

Jump to

Keyboard shortcuts

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