update

package
v1.46.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Window

type Window struct {
	From string   `json:"from"`
	To   string   `json:"to"`
	Days []string `json:"days"`
}

Window single window

func (*Window) DeepCopy

func (uw *Window) DeepCopy() *Window

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateWindow.

func (*Window) DeepCopyInto

func (uw *Window) DeepCopyInto(out *Window)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Window) IsAllowed

func (uw Window) IsAllowed(now time.Time) bool

IsAllowed check if specified window is allowed at the moment or not

type Windows

type Windows []Window

Windows update windows

func FromJSON

func FromJSON(data []byte) (Windows, error)

FromJSON returns update Windows from json

func (Windows) DeepCopy

func (ws Windows) DeepCopy() Windows

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateWindows.

func (Windows) DeepCopyInto

func (ws Windows) DeepCopyInto(out *Windows)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Windows) IsAllowed

func (ws Windows) IsAllowed(t time.Time) bool

IsAllowed returns if specified time get into windows

func (Windows) NextAllowedTime added in v1.36.0

func (ws Windows) NextAllowedTime(min time.Time) time.Time

NextAllowedTime calculates next update window with respect on minimalTime if minimal time is out of window - this function checks next days to find the nearest one

Jump to

Keyboard shortcuts

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