blocks

package
v0.1.1-0...-7a2fd5f Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsJSON

func IsJSON(b []byte) bool

Checks if bytes is JSON.

func IsJSONString

func IsJSONString(s string) bool

Checks if string is json.

Types

type BuildContext

type BuildContext struct {
	BaseCooldown      time.Duration
	Channel           string
	Context           context.Context
	CooldownThreshold time.Duration
	CurrentCooldown   time.Duration
	DataText          []byte
	ErrorText         []byte
	Forced            bool
	Iteration         int
	Message           string
	Next              Timing
	Previous          Timing
}

func (*BuildContext) Deadline

func (bc *BuildContext) Deadline() (deadline time.Time, ok bool)

implements context.Context.

func (*BuildContext) Done

func (bc *BuildContext) Done() <-chan struct{}

implements context.Context.

func (*BuildContext) Err

func (bc *BuildContext) Err() error

implements context.Context

func (*BuildContext) IsNil

func (bc *BuildContext) IsNil() bool

func (BuildContext) MarshalJSON

func (bc BuildContext) MarshalJSON() ([]byte, error)

func (*BuildContext) MarshalJSONObject

func (bc *BuildContext) MarshalJSONObject(enc *gojay.Encoder)

func (*BuildContext) Value

func (bc *BuildContext) Value(key interface{}) interface{}

implements context.Context.

type Display

type Display interface {
	Display() []byte
}

type Timing

type Timing struct {
	CooldownDebounce time.Time
	Send             time.Time
	Threshold        time.Time
}

func (Timing) IsNil

func (t Timing) IsNil() bool

func (Timing) MarshalJSON

func (t Timing) MarshalJSON() ([]byte, error)

func (Timing) MarshalJSONObject

func (t Timing) MarshalJSONObject(enc *gojay.Encoder)

Jump to

Keyboard shortcuts

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