action

package
v0.0.0-...-bd030fc Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntityStrings

func EntityStrings() []string

EntityStrings returns a slice of all String values of the enum

func Marshal

func Marshal(a Action) []byte

func TypeStrings

func TypeStrings() []string

TypeStrings returns a slice of all String values of the enum

Types

type Action

type Action struct {
	Entity       Entity
	Type         Type
	ID           int
	RepositoryID int64
}

func (Action) Is

func (a Action) Is(t Type, e Entity) bool

func (Action) MarshalBinary

func (a Action) MarshalBinary() ([]byte, error)

func (Action) MarshalText

func (a Action) MarshalText() ([]byte, error)

func (Action) String

func (a Action) String() string

func (*Action) UnmarshalBinary

func (a *Action) UnmarshalBinary(data []byte) error

func (*Action) UnmarshalText

func (a *Action) UnmarshalText(data []byte) error

type Entity

type Entity uint8
const (
	Unknown Entity = iota
	PullRequest
	Issue
)

func EntityString

func EntityString(s string) (Entity, error)

EntityString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func EntityValues

func EntityValues() []Entity

EntityValues returns all values of the enum

func (Entity) IsAEntity

func (i Entity) IsAEntity() bool

IsAEntity returns "true" if the value is listed in the enum definition. "false" otherwise

func (Entity) String

func (i Entity) String() string

type Type

type Type uint8
const (
	UnknownType Type = iota
	Merge
	Close
)

func TypeString

func TypeString(s string) (Type, error)

TypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func TypeValues

func TypeValues() []Type

TypeValues returns all values of the enum

func (Type) IsAType

func (i Type) IsAType() bool

IsAType returns "true" if the value is listed in the enum definition. "false" otherwise

func (Type) String

func (i Type) String() string

Jump to

Keyboard shortcuts

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