services

package
v0.0.0-...-ba86dd7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type DateInterface

type DateInterface interface {
	GetDistance(start, end int) (before, after int)
	GetLunarDistance(start, end int) (before, after int)
}

type DateService

type DateService struct {
	DlwClient client.Client
}

func ProvideDateService

func ProvideDateService(registery *mesh.Registry) *DateService

provide for wire

func (*DateService) GetDistance

func (service *DateService) GetDistance(start, end int) (before, after int)

Get distance from date-api for given date Currently only support POST method

func (*DateService) GetLunarDistance

func (service *DateService) GetLunarDistance(start, end int) (before, after int)

Get distance from date-api for given date (Lunar) Currently only support POST method

type Distance

type Distance struct {
	StartYMD  int
	TargetYMD int
	Lunar     bool
	Before    int64
	After     int64
}

Date distance for the given month-day, the previous and next startYMD around targetYMD maps to before and after

Jump to

Keyboard shortcuts

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