sourcetype

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sourcetype is an enumeration of the states Upload, Snapshot

Index

Constants

This section is empty.

Variables

View Source
var ValidStrings = []string{
	Upload.String(),
	Snapshot.String(),
}

ValidStrings is the set of strings that are valid inputs to ParseEnum

Functions

This section is empty.

Types

type Enum

type Enum uint8

Enum is an enumerated type

const (
	// Upload is an enumeration for sourcetype.Enum
	Upload Enum = iota + 1
	// Snapshot is an enumeration for sourcetype.Enum
	Snapshot
)

func ParseEnum

func ParseEnum(name string) (Enum, error)

ParseEnum attempts to convert a string into a Enum

func (Enum) MarshalText

func (i Enum) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (Enum) String

func (i Enum) String() string

String makes Enum satisfy the Stringer interface

func (*Enum) UnmarshalText

func (i *Enum) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

Jump to

Keyboard shortcuts

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