update

package
v1.32.13 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 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

Jump to

Keyboard shortcuts

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