gpb

package
v1.10.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ByRevision

type ByRevision []*Revision

ByRevision sorts to latest revision to the top, i.e. [0]

func (ByRevision) Len

func (r ByRevision) Len() int

func (ByRevision) Less

func (r ByRevision) Less(i, j int) bool

func (ByRevision) Swap

func (r ByRevision) Swap(i, j int)

type Entry

type Entry struct {
	Name      string      `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Revisions []*Revision `protobuf:"bytes,2,rep,name=Revisions,proto3" json:"Revisions,omitempty"`
	// contains filtered or unexported fields
}

func (*Entry) Delete

func (e *Entry) Delete(msg string) bool

Delete marks an entry as deleted

func (*Entry) Descriptor deprecated

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

Deprecated: Use Entry.ProtoReflect.Descriptor instead.

func (*Entry) Equals

func (e *Entry) Equals(other *Entry) bool

Equals compares two entries

func (*Entry) GetName

func (x *Entry) GetName() string

func (*Entry) GetRevisions

func (x *Entry) GetRevisions() []*Revision

func (*Entry) IsDeleted

func (e *Entry) IsDeleted() bool

IsDeleted returns true is an entry was marked as deleted

func (*Entry) Latest

func (e *Entry) Latest() *Revision

Latest returns the latest revision

func (*Entry) Merge

func (e *Entry) Merge(other *Entry) *Entry

Merge merges

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) ProtoReflect

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

func (*Entry) Reset

func (x *Entry) Reset()

func (*Entry) SortedRevisions

func (e *Entry) SortedRevisions() []*Revision

SortedRevisions returns a list of sorted revisions

func (*Entry) String

func (x *Entry) String() string

type Revision

type Revision struct {
	Created   *timestamp.Timestamp `protobuf:"bytes,1,opt,name=Created,proto3" json:"Created,omitempty"`
	Message   string               `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	Filename  string               `protobuf:"bytes,3,opt,name=Filename,proto3" json:"Filename,omitempty"`
	Tombstone bool                 `protobuf:"varint,4,opt,name=Tombstone,proto3" json:"Tombstone,omitempty"`
	// contains filtered or unexported fields
}

func (*Revision) Descriptor deprecated

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

Deprecated: Use Revision.ProtoReflect.Descriptor instead.

func (*Revision) Equals

func (r *Revision) Equals(other *Revision) bool

Equals compares

func (*Revision) GetCreated

func (x *Revision) GetCreated() *timestamp.Timestamp

func (*Revision) GetFilename

func (x *Revision) GetFilename() string

func (*Revision) GetMessage

func (x *Revision) GetMessage() string

func (*Revision) GetTombstone

func (x *Revision) GetTombstone() bool

func (*Revision) ID

func (r *Revision) ID() string

ID returns the unique ID of this entry TODO: It's not really unique. Need to fix that.

func (*Revision) ProtoMessage

func (*Revision) ProtoMessage()

func (*Revision) ProtoReflect

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

func (*Revision) Reset

func (x *Revision) Reset()

func (*Revision) String

func (x *Revision) String() string

func (*Revision) Time

func (r *Revision) Time() time.Time

Time returns the time a revision was created

type Store

type Store struct {
	Name    string            `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Entries map[string]*Entry `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Store) Descriptor deprecated

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

Deprecated: Use Store.ProtoReflect.Descriptor instead.

func (*Store) GetEntries

func (x *Store) GetEntries() map[string]*Entry

func (*Store) GetName

func (x *Store) GetName() string

func (*Store) ListBlobs

func (s *Store) ListBlobs() []string

ListBlobs lists all blobs

func (*Store) Merge

func (s *Store) Merge(other *Store) error

Merge merges

func (*Store) ProtoMessage

func (*Store) ProtoMessage()

func (*Store) ProtoReflect

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

func (*Store) Reset

func (x *Store) Reset()

func (*Store) String

func (x *Store) String() string

Jump to

Keyboard shortcuts

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