utils

package
v0.2.13-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisallowFutureRange

func DisallowFutureRange(startTime, endTime time.Time) error

DisallowFutureRange is an additional check for validating time ranges which disallows ranges which are in the future.

func DisallowZeroRange

func DisallowZeroRange(startTime, endTime time.Time) error

DisallowZeroRange is an additional check for validating time ranges which disallows the start time and end time to be equal.

func GetOutPointFromString

func GetOutPointFromString(chanStr string) (*wire.OutPoint, error)

GetOutPointFromString gets the channel outpoint from a string.

func ValidateTimeRange

func ValidateTimeRange(startTime, endTime time.Time,
	checks ...ValidateRangeOption) error

ValidateTimeRange checks that a start time is before an end time. It takes an optional set of additional checks, and will fail if any of them error.

Types

type ValidateRangeOption

type ValidateRangeOption func(startTime, endTime time.Time) error

ValidateRangeOption is an additional check that can be applied when validating time ranges.

Jump to

Keyboard shortcuts

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