bugpb

package module
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: GPL-3.0 Imports: 14 Imported by: 3

README

protobuf definition file for git-bug

an experiement with git-bug

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Init

func Init() bool

func SanitizeProtoUTF8 added in v0.0.5

func SanitizeProtoUTF8(msg proto.Message) error

SanitizeProtoUTF8 fixes all invalid UTF-8 strings in a proto.Message recursively.

func ValidateProtoUTF8 added in v0.0.5

func ValidateProtoUTF8(msg proto.Message) error

ValidateProtoUTF8 checks all string fields in a proto.Message recursively.

Types

type Bug added in v0.0.2

type Bug struct {
	Uuid    string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
	// contains filtered or unexported fields
}

func (*Bug) Descriptor deprecated added in v0.0.2

func (*Bug) Descriptor() ([]byte, []int)

Deprecated: Use Bug.ProtoReflect.Descriptor instead.

func (*Bug) GetName added in v0.0.2

func (x *Bug) GetName() string

func (*Bug) GetSubject added in v0.0.2

func (x *Bug) GetSubject() string

func (*Bug) GetUuid added in v0.0.2

func (x *Bug) GetUuid() string

func (*Bug) ProtoMessage added in v0.0.2

func (*Bug) ProtoMessage()

func (*Bug) ProtoReflect added in v0.0.2

func (x *Bug) ProtoReflect() protoreflect.Message

func (*Bug) Reset added in v0.0.2

func (x *Bug) Reset()

func (*Bug) String added in v0.0.2

func (x *Bug) String() string

type BugScanner added in v0.0.2

type BugScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*BugScanner) Next added in v0.0.2

func (it *BugScanner) Next() *Bug

Next() returns the next thing in the array

func (*BugScanner) Scan added in v0.0.2

func (it *BugScanner) Scan() bool

type Bugs added in v0.0.2

type Bugs struct {
	Uuid    string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`       // `autogenpb:uuid:cdf6711e-f948-4376-9e72-cf1912a96cee`
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v1`
	Bugs    []*Bug `protobuf:"bytes,3,rep,name=Bugs,proto3" json:"Bugs,omitempty"`       // this never gets used, but it's not worth violating the autogenpb standard
	// contains filtered or unexported fields
}

func NewBugs added in v0.0.2

func NewBugs() *Bugs

func (*Bugs) All added in v0.0.2

func (x *Bugs) All() *BugScanner

func (*Bugs) Append added in v0.0.2

func (x *Bugs) Append(y *Bug)

a Append() shortcut (that does Clone() with a mutex) notsure if it really works

func (*Bugs) Clone added in v0.0.10

func (x *Bugs) Clone(y *Bug) *Bug

a Clone() shortcut (with a mutex). notsure if it really works

func (*Bugs) Delete added in v0.0.2

func (x *Bugs) Delete(y *Bug) bool

func (*Bugs) Descriptor deprecated added in v0.0.2

func (*Bugs) Descriptor() ([]byte, []int)

Deprecated: Use Bugs.ProtoReflect.Descriptor instead.

func (*Bugs) FormatJSON added in v0.0.2

func (v *Bugs) FormatJSON() string

human readable JSON

func (*Bugs) FormatTEXT added in v0.0.2

func (v *Bugs) FormatTEXT() string

apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!

func (*Bugs) GetBugs added in v0.0.2

func (x *Bugs) GetBugs() []*Bug

func (*Bugs) GetUuid added in v0.0.2

func (x *Bugs) GetUuid() string

func (*Bugs) GetVersion added in v0.0.2

func (x *Bugs) GetVersion() string

func (*Bugs) IterAll added in v0.0.2

func (x *Bugs) IterAll() iter.Seq[*Bug]

Iterate 'for x := range' syntax using the awesome golang 1.24 'iter'

func (*Bugs) Len added in v0.0.2

func (x *Bugs) Len() int

func (*Bugs) Marshal added in v0.0.2

func (v *Bugs) Marshal() ([]byte, error)

marshal to wire. This is called winning.

func (*Bugs) MarshalJSON added in v0.0.2

func (v *Bugs) MarshalJSON() ([]byte, error)

marshal json

func (*Bugs) ProtoMessage added in v0.0.2

func (*Bugs) ProtoMessage()

func (*Bugs) ProtoReflect added in v0.0.2

func (x *Bugs) ProtoReflect() protoreflect.Message

func (*Bugs) Reset added in v0.0.2

func (x *Bugs) Reset()

func (*Bugs) String added in v0.0.2

func (x *Bugs) String() string

func (*Bugs) Unmarshal added in v0.0.2

func (v *Bugs) Unmarshal(data []byte) error

unmarshal from wire. You have won.

func (*Bugs) UnmarshalJSON added in v0.0.2

func (v *Bugs) UnmarshalJSON(data []byte) error

unmarshal json

func (*Bugs) UnmarshalTEXT added in v0.0.2

func (v *Bugs) UnmarshalTEXT(data []byte) error

unmarshalTEXT. This reads the .text config file back in after the user edits it

type BugsScanner added in v0.0.2

type BugsScanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*BugsScanner) Next added in v0.0.2

func (it *BugsScanner) Next() *Bugs

Next() returns the next thing in the array

func (*BugsScanner) Scan added in v0.0.2

func (it *BugsScanner) Scan() bool

Jump to

Keyboard shortcuts

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