timeutils

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const KeptnTimeFormatISO8601 = "2006-01-02T15:04:05.000Z"

Variables

This section is empty.

Functions

func GetKeptnTimeStamp

func GetKeptnTimeStamp(timestamp time.Time) string

GetKeptnTimeStamp formats a given timestamp into the format used by Keptn which is following the ISO 8601 standard

func GetStartEndTime

func GetStartEndTime(params GetStartEndTimeParams) (*time.Time, *time.Time, error)

GetStartEndTime parses the provided start date, end date and/or timeframe

func ParseTimestamp

func ParseTimestamp(timestamp string) (*time.Time, error)

Types

type GetStartEndTimeParams

type GetStartEndTimeParams struct {
	StartDate  string
	EndDate    string
	Timeframe  string
	TimeFormat string
}

func (*GetStartEndTimeParams) Validate

func (params *GetStartEndTimeParams) Validate() error

Jump to

Keyboard shortcuts

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