time

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProviders

func GetProviders() map[string]cuexruntime.ProviderFn

GetProviders return the provider

func GetTemplate

func GetTemplate() string

GetTemplate return the template

Types

type DateParams

type DateParams = providertypes.Params[DateVars]

DateParams .

type DateReturnVars

type DateReturnVars struct {
	Date string `json:"date"`
}

DateReturnVars .

type DateReturns

type DateReturns = providertypes.Returns[DateReturnVars]

DateReturns .

func Date

func Date(_ context.Context, params *DateParams) (*DateReturns, error)

Date convert timestamp to date

type DateVars

type DateVars struct {
	Timestamp int64  `json:"timestamp"`
	Layout    string `json:"layout,omitempty"`
}

DateVars .

type TimestampParams

type TimestampParams = providertypes.Params[TimestampVars]

TimestampParams .

type TimestampReturnVars

type TimestampReturnVars struct {
	Timestamp int64 `json:"timestamp"`
}

TimestampReturnVars .

type TimestampReturns

type TimestampReturns = providertypes.Returns[TimestampReturnVars]

TimestampReturns .

func Timestamp

func Timestamp(_ context.Context, params *TimestampParams) (*TimestampReturns, error)

Timestamp convert date to timestamp

type TimestampVars

type TimestampVars struct {
	Date   string `json:"date"`
	Layout string `json:"layout,omitempty"`
}

TimestampVars .

Jump to

Keyboard shortcuts

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