forgepb

package module
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: GPL-3.0 Imports: 27 Imported by: 26

README

protobuf definition files for forge

Documentation

Overview

Example

This example is copied from rill to understand golang docs

package main

import (
	"fmt"
)

func main() {
	fmt.Println("nothing here yet")
}
Output:

Example (Batching)

This example is copied from rill to understand golang docs

package main

import (
	"fmt"
)

func main() {
	fmt.Println("nothing batching here yet")
}
Output:

Index

Examples

Constants

This section is empty.

Variables

View Source
var FORGEPB *log.LogFlag
View Source
var FORGEPBWARN *log.LogFlag
View Source
var File_forgeConfig_proto protoreflect.FileDescriptor
View Source
var File_patch_proto protoreflect.FileDescriptor

Functions

func IsGitDir added in v0.0.7

func IsGitDir(dir string) bool

IsGitDir checks if a .git directory exists inside the given directory

func ReleaseReportHeader added in v0.0.16

func ReleaseReportHeader() string

func RunGitClone added in v0.0.39

func RunGitClone(newdir, basedir, giturl string) error

git clone (also downloads git notes) newdir = helloworld basedir = /home/jcarr/go/src/go.wit.com/apps giturl = https://gitea.wit.com/gui/helloworld

Types

type Forge added in v0.0.7

type Forge struct {
	Config  *ForgeConfigs // config repos for readonly, private, etc
	Repos   *gitpb.Repos
	Machine *zoopb.Machine
	// contains filtered or unexported fields
}

maybe an interface someday?

func Init added in v0.0.7

func Init() *Forge

todo: use initOnce cache.go has Do() f.initOnce.Do(f.initWork)

func InitPB added in v0.0.29

func InitPB() *Forge

only init's the protobuf. intended to not scan or change anything

func (*Forge) AddFullPath added in v0.0.36

func (f *Forge) AddFullPath(fulldir string) *gitpb.Repo

func (*Forge) Build added in v0.0.13

func (f *Forge) Build(repo *gitpb.Repo, userFlags []string) error

func (*Forge) CheckOverride added in v0.0.28

func (f *Forge) CheckOverride(gopath string) bool

func (*Forge) CheckoutDevel added in v0.0.18

func (f *Forge) CheckoutDevel() bool

func (*Forge) CheckoutMaster added in v0.0.18

func (f *Forge) CheckoutMaster() bool

func (*Forge) CheckoutUser added in v0.0.18

func (f *Forge) CheckoutUser() bool

func (*Forge) ConfigPrintTable added in v0.0.7

func (f *Forge) ConfigPrintTable()

print a human readable table to STDOUT

func (*Forge) ConfigSave added in v0.0.7

func (f *Forge) ConfigSave() error

func (*Forge) DeleteByGoPath added in v0.0.37

func (f *Forge) DeleteByGoPath(gopath string) bool

func (*Forge) Exit added in v0.0.37

func (f *Forge) Exit()

saves the config if there have been changes

func (*Forge) FinalGoDepsCheckOk added in v0.0.16

func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool

DOES NOT MODIFY ANYTHING

this is a final check to make sure, before pushing a golang repo, that the go.sum file has the correct and current version of every package

it re-scans the go.sum file. DOES NOT MODIFY ANYTHING this is the last thing to run to double check everything before 'git tag' or git push --tags

func (*Forge) FindAnyPath added in v0.0.39

func (f *Forge) FindAnyPath(dir string) *gitpb.Repo

tries any parent

func (*Forge) FindByGoPath added in v0.0.37

func (f *Forge) FindByGoPath(gopath string) *gitpb.Repo

func (*Forge) FindWorkingDirRepo added in v0.0.35

func (f *Forge) FindWorkingDirRepo() *gitpb.Repo

sortcut to find

func (*Forge) GetGoSrc added in v0.0.7

func (f *Forge) GetGoSrc() string

func (*Forge) GitPull added in v0.0.18

func (f *Forge) GitPull() bool

func (*Forge) GoClone added in v0.0.39

func (f *Forge) GoClone(gopath string) (*gitpb.Repo, error)

will not violate filesystem namespace always returns the path or a parent path

attemps to exec git clone based off of a golang path will transferse parent directories in case the path is a child of a git repo

returns *gitpb.Repo if already cloned

example gopath = go.wit.com/apps/go-clone or "go.googlesource.com/go/src/cmd/internal/pkgpath/" returns repo for "go.googlesource.com/go"

func (*Forge) Install added in v0.0.15

func (f *Forge) Install(repo *gitpb.Repo, userFlags []string) error

func (*Forge) IsGoWork added in v0.0.27

func (f *Forge) IsGoWork() bool

func (*Forge) MakeDevelBranch added in v0.0.28

func (f *Forge) MakeDevelBranch(repo *gitpb.Repo) error

func (*Forge) MakeDevelPatchSet added in v0.0.28

func (f *Forge) MakeDevelPatchSet() (*Patchs, error)

func (*Forge) MakeGoWork added in v0.0.27

func (f *Forge) MakeGoWork() error

very much a hack job

func (*Forge) MakeMasterPatchSet added in v0.0.28

func (f *Forge) MakeMasterPatchSet() (*Patchs, error)

func (*Forge) MakeUserBranch added in v0.0.28

func (f *Forge) MakeUserBranch(repo *gitpb.Repo) error

func (*Forge) NewGoRepo added in v0.0.37

func (f *Forge) NewGoRepo(gopath string, url string) (*gitpb.Repo, error)

func (*Forge) PrintReleaseReport added in v0.0.37

func (f *Forge) PrintReleaseReport(repos *gitpb.Repos) int

func (*Forge) RillRedoGoMod added in v0.0.19

func (f *Forge) RillRedoGoMod() int

func (*Forge) ScanGoSrc added in v0.0.7

func (f *Forge) ScanGoSrc() (bool, error)

func (*Forge) SendPatchSet added in v0.0.28

func (f *Forge) SendPatchSet(pset *Patchs) error

func (*Forge) SetConfigSave added in v0.0.37

func (f *Forge) SetConfigSave(b bool)

func (*Forge) StandardReleaseHeader added in v0.0.16

func (f *Forge) StandardReleaseHeader(repo *gitpb.Repo, state string) string

show information while doing golang releases

func (*Forge) ValidGoVersion added in v0.0.36

func (f *Forge) ValidGoVersion(ver string) (bool, error)

golang versions MUST be vX.X.X it can not be vX.X and it also can not be v0.0.0 verifies the version is format v3.2.1

func (*Forge) VerifyBranchNames added in v0.0.13

func (f *Forge) VerifyBranchNames(repo *gitpb.Repo)

this is still in flux

type ForgeConfig added in v0.0.7

type ForgeConfig struct {
	GoPath           string                 `protobuf:"bytes,1,opt,name=goPath,proto3" json:"goPath,omitempty"`                     // `autogenpb:unique` // Examples: 'go.wit.com/apps/go-clone' or "~/mythings" or "/home/src/foo"
	Writable         bool                   `protobuf:"varint,2,opt,name=writable,proto3" json:"writable,omitempty"`                // if you have write access to the repo
	ReadOnly         bool                   `protobuf:"varint,3,opt,name=readOnly,proto3" json:"readOnly,omitempty"`                // the opposite, but needed for now because I don't know what I'm doing
	Private          bool                   `protobuf:"varint,4,opt,name=private,proto3" json:"private,omitempty"`                  // if the repo can be published
	Directory        bool                   `protobuf:"varint,5,opt,name=directory,proto3" json:"directory,omitempty"`              // everything in this directory should use these writable & private values
	Favorite         bool                   `protobuf:"varint,6,opt,name=favorite,proto3" json:"favorite,omitempty"`                // you like this. always git clone/go clone this repo
	Interesting      bool                   `protobuf:"varint,7,opt,name=interesting,proto3" json:"interesting,omitempty"`          // this is something interesting you found and want to remember it
	MasterBranchName string                 `protobuf:"bytes,8,opt,name=masterBranchName,proto3" json:"masterBranchName,omitempty"` // git 'main' or 'master' branch name
	DevelBranchName  string                 `protobuf:"bytes,9,opt,name=develBranchName,proto3" json:"develBranchName,omitempty"`   // whatever the git 'devel' branch name is
	UserBranchName   string                 `protobuf:"bytes,10,opt,name=userBranchName,proto3" json:"userBranchName,omitempty"`    // whatever your username branch is
	DebName          string                 `protobuf:"bytes,11,opt,name=debName,proto3" json:"debName,omitempty"`                  // the actual name used with 'apt install' (or distro apt equivalent.
	Verstamp         *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=verstamp,proto3" json:"verstamp,omitempty"`                // the git commit timestamp of the version
	GoSrc            string                 `protobuf:"bytes,13,opt,name=goSrc,proto3" json:"goSrc,omitempty"`                      // is ~/go/src unless a go.work file is found
	// contains filtered or unexported fields
}

define 3 branches. that is all that is supported the term 'master' is used in the code because 'main' is a reserved word in golang already allow 'read only' and 'private' flags package names sometimes must be different than the binary name for example 'zookeeper' is packaged as 'zookeeper-go'

due to the prior apache foundation project. This happens and is ok!

func (*ForgeConfig) Descriptor deprecated added in v0.0.7

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

Deprecated: Use ForgeConfig.ProtoReflect.Descriptor instead.

func (*ForgeConfig) GetDebName added in v0.0.7

func (x *ForgeConfig) GetDebName() string

func (*ForgeConfig) GetDevelBranchName added in v0.0.7

func (x *ForgeConfig) GetDevelBranchName() string

func (*ForgeConfig) GetDirectory added in v0.0.7

func (x *ForgeConfig) GetDirectory() bool

func (*ForgeConfig) GetFavorite added in v0.0.7

func (x *ForgeConfig) GetFavorite() bool

func (*ForgeConfig) GetGoPath added in v0.0.7

func (x *ForgeConfig) GetGoPath() string

func (*ForgeConfig) GetGoSrc added in v0.0.23

func (x *ForgeConfig) GetGoSrc() string

func (*ForgeConfig) GetInteresting added in v0.0.7

func (x *ForgeConfig) GetInteresting() bool

func (*ForgeConfig) GetMasterBranchName added in v0.0.7

func (x *ForgeConfig) GetMasterBranchName() string

func (*ForgeConfig) GetPrivate added in v0.0.7

func (x *ForgeConfig) GetPrivate() bool

func (*ForgeConfig) GetReadOnly added in v0.0.7

func (x *ForgeConfig) GetReadOnly() bool

func (*ForgeConfig) GetUserBranchName added in v0.0.7

func (x *ForgeConfig) GetUserBranchName() string

func (*ForgeConfig) GetVerstamp added in v0.0.7

func (x *ForgeConfig) GetVerstamp() *timestamppb.Timestamp

func (*ForgeConfig) GetWritable added in v0.0.7

func (x *ForgeConfig) GetWritable() bool

func (*ForgeConfig) ProtoMessage added in v0.0.7

func (*ForgeConfig) ProtoMessage()

func (*ForgeConfig) ProtoReflect added in v0.0.7

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

func (*ForgeConfig) Reset added in v0.0.7

func (x *ForgeConfig) Reset()

func (*ForgeConfig) String added in v0.0.7

func (x *ForgeConfig) String() string

type ForgeConfigGoPath added in v0.0.11

type ForgeConfigGoPath []*ForgeConfig

func (ForgeConfigGoPath) Len added in v0.0.11

func (a ForgeConfigGoPath) Len() int

func (ForgeConfigGoPath) Less added in v0.0.11

func (a ForgeConfigGoPath) Less(i, j int) bool

func (ForgeConfigGoPath) Swap added in v0.0.11

func (a ForgeConfigGoPath) Swap(i, j int)

type ForgeConfigIterator added in v0.0.7

type ForgeConfigIterator struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewForgeConfigIterator added in v0.0.7

func NewForgeConfigIterator(things []*ForgeConfig) *ForgeConfigIterator

NewForgeConfigIterator initializes a new iterator.

func (*ForgeConfigIterator) Next added in v0.0.7

func (it *ForgeConfigIterator) Next() *ForgeConfig

Next() returns the next thing in the array

func (*ForgeConfigIterator) Scan added in v0.0.7

func (it *ForgeConfigIterator) Scan() bool

Scan moves to the next element and returns false if there are no more things. Use Scan() in a loop, similar to a while loop

for iterator.Scan()
	d := iterator.Next(
	fmt.Println("found UUID:", d.Uuid
}

type ForgeConfigs added in v0.0.7

type ForgeConfigs struct {
	Uuid         string         `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`       // could be useful for /usr/share/file/magic someday?
	Version      string         `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // could be used for protobuf schema change violations?
	ForgeConfigs []*ForgeConfig `protobuf:"bytes,3,rep,name=ForgeConfigs,proto3" json:"ForgeConfigs,omitempty"`
	Username     string         `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` // what to use for the user branch (default ENV{USER})
	// contains filtered or unexported fields
}

func (*ForgeConfigs) All added in v0.0.7

func (all *ForgeConfigs) All() *ForgeConfigIterator

func (*ForgeConfigs) Append added in v0.0.7

func (all *ForgeConfigs) Append(newP *ForgeConfig) bool

does not enforce any unique fields

func (*ForgeConfigs) AppendUniqueGoPath added in v0.0.7

func (all *ForgeConfigs) AppendUniqueGoPath(newP *ForgeConfig) bool

enforces GoPath is unique

func (*ForgeConfigs) ConfigLoad added in v0.0.7

func (c *ForgeConfigs) ConfigLoad() error

load the ~/.config/forge/ files

func (*ForgeConfigs) ConfigSave added in v0.0.23

func (f *ForgeConfigs) ConfigSave() error

write to ~/.config/forge/ unless ENV{FORGE_CONFIG} is set

func (*ForgeConfigs) DebName added in v0.0.23

func (fc *ForgeConfigs) DebName(gopath string) string

returns the deb package name this let's you check a git tag version against a package .deb version allows gopath's to not need to match the .deb name this is important in lots of cases! It is normal and happens often enough.

func (*ForgeConfigs) DeleteByGoPath added in v0.0.7

func (all *ForgeConfigs) DeleteByGoPath(s string) bool

func (*ForgeConfigs) Descriptor deprecated added in v0.0.7

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

Deprecated: Use ForgeConfigs.ProtoReflect.Descriptor instead.

func (*ForgeConfigs) FindByGoPath added in v0.0.7

func (all *ForgeConfigs) FindByGoPath(s string) *ForgeConfig

find a dependancy by the go path

func (*ForgeConfigs) FindUserBranch added in v0.0.41

func (fc *ForgeConfigs) FindUserBranch(thing string) string

allows custom user branch names in the forge config

func (*ForgeConfigs) FormatJSON added in v0.0.7

func (v *ForgeConfigs) FormatJSON() string

human readable JSON

func (*ForgeConfigs) FormatTEXT added in v0.0.7

func (v *ForgeConfigs) FormatTEXT() string

apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's so great for config files, I'm using it by default to try to fix the problems with it

func (*ForgeConfigs) GetForgeConfigs added in v0.0.7

func (x *ForgeConfigs) GetForgeConfigs() []*ForgeConfig

func (*ForgeConfigs) GetUsername added in v0.0.41

func (x *ForgeConfigs) GetUsername() string

func (*ForgeConfigs) GetUuid added in v0.0.7

func (x *ForgeConfigs) GetUuid() string

func (*ForgeConfigs) GetVersion added in v0.0.7

func (x *ForgeConfigs) GetVersion() string

func (*ForgeConfigs) IsFavorite added in v0.0.23

func (fc *ForgeConfigs) IsFavorite(thing string) bool

IsFavorite() -- fun option for the config file that lets you set things as favorites so you can just go-clone a bunch of common things on a new box or after you reset/delete your ~/go/src dir

func (*ForgeConfigs) IsPrivate added in v0.0.23

func (fc *ForgeConfigs) IsPrivate(thing string) bool

is this a non-publishable repo? matches package names from apt

IsPrivate("foo") will match anything in the config file ending in "foo"

IsPrivate("go.foo.com/jcarr/foo") returns true if private IsPrivate("foo") also returns true if "go.bar.com/jcarr/foo" is private

func (*ForgeConfigs) IsReadOnly added in v0.0.19

func (fc *ForgeConfigs) IsReadOnly(gopath string) bool

returns true if gopath is readonly() will attempt to match IsWritable("foo") against anything ending in "foo"

func (*ForgeConfigs) IsWritable added in v0.0.23

func (fc *ForgeConfigs) IsWritable(thing string) bool

IsWritable() checks your .config/forge/ settings looks for an exact match, then looks for a directory match

func (*ForgeConfigs) Len added in v0.0.7

func (all *ForgeConfigs) Len() int

func (*ForgeConfigs) Marshal added in v0.0.7

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

marshal to wire. This is called winning.

func (*ForgeConfigs) MarshalJSON added in v0.0.7

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

marshal json

func (*ForgeConfigs) ProtoMessage added in v0.0.7

func (*ForgeConfigs) ProtoMessage()

func (*ForgeConfigs) ProtoReflect added in v0.0.7

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

func (*ForgeConfigs) ReplaceGoPath added in v0.0.7

func (all *ForgeConfigs) ReplaceGoPath(newP *ForgeConfig) bool

enforces GoPath is unique

func (*ForgeConfigs) Reset added in v0.0.7

func (x *ForgeConfigs) Reset()

func (*ForgeConfigs) SortByGoPath added in v0.0.11

func (all *ForgeConfigs) SortByGoPath() *ForgeConfigIterator

func (*ForgeConfigs) String added in v0.0.7

func (x *ForgeConfigs) String() string

func (*ForgeConfigs) Unmarshal added in v0.0.7

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

unmarshal from wire. You have won.

func (*ForgeConfigs) UnmarshalJSON added in v0.0.7

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

unmarshal json

func (*ForgeConfigs) UnmarshalTEXT added in v0.0.7

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

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

type Module added in v0.0.8

type Module struct {
	Path       string       // module path
	Query      string       // version query corresponding to this version
	Version    string       // module version
	Versions   []string     // available module versions
	Replace    *Module      // replaced by this module
	Time       *time.Time   // time version was created
	Update     *Module      // available update (with -u)
	Main       bool         // is this the main module?
	Indirect   bool         // module is only indirectly needed by main module
	Dir        string       // directory holding local copy of files, if any
	GoMod      string       // path to go.mod file describing module, if any
	GoVersion  string       // go version used in module
	Retracted  []string     // retraction information, if any (with -retracted or -u)
	Deprecated string       // deprecation message, if any (with -u)
	Error      *ModuleError // error loading module
	Sum        string       // checksum for path, version (as in go.sum)
	GoModSum   string       // checksum for go.mod (as in go.sum)
	Reuse      bool         // reuse of old module info is safe
	Origin     Origin
}

type ModuleError added in v0.0.8

type ModuleError struct {
	Err string // the error itself
}

type Origin added in v0.0.8

type Origin struct {
	VCS    string `json:",omitempty"` // "git" etc
	URL    string `json:",omitempty"` // URL of repository
	Subdir string `json:",omitempty"` // subdirectory in repo

	Hash string `json:",omitempty"` // commit hash or ID

	// If TagSum is non-empty, then the resolution of this module version
	// depends on the set of tags present in the repo, specifically the tags
	// of the form TagPrefix + a valid semver version.
	// If the matching repo tags and their commit hashes still hash to TagSum,
	// the Origin is still valid (at least as far as the tags are concerned).
	// The exact checksum is up to the Repo implementation; see (*gitRepo).Tags.
	TagPrefix string `json:",omitempty"`
	TagSum    string `json:",omitempty"`

	// If Ref is non-empty, then the resolution of this module version
	// depends on Ref resolving to the revision identified by Hash.
	// If Ref still resolves to Hash, the Origin is still valid (at least as far as Ref is concerned).
	// For Git, the Ref is a full ref like "refs/heads/main" or "refs/tags/v1.2.3",
	// and the Hash is the Git object hash the ref maps to.
	// Other VCS might choose differently, but the idea is that Ref is the name
	// with a mutable meaning while Hash is a name with an immutable meaning.
	Ref string `json:",omitempty"`

	// If RepoSum is non-empty, then the resolution of this module version
	// failed due to the repo being available but the version not being present.
	// This depends on the entire state of the repo, which RepoSum summarizes.
	// For Git, this is a hash of all the refs and their hashes.
	RepoSum string `json:",omitempty"`
}

An Origin describes the provenance of a given repo method result. It can be passed to CheckReuse (usually in a different go command invocation) to see whether the result remains up-to-date.

type Patch added in v0.0.28

type Patch struct {
	Filename   string                 `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`     // `autogenpb:unique`
	Data       []byte                 `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`             //
	RepoPath   string                 `protobuf:"bytes,3,opt,name=repoPath,proto3" json:"repoPath,omitempty"`     // path to the git repo
	BranchName string                 `protobuf:"bytes,4,opt,name=branchName,proto3" json:"branchName,omitempty"` //
	BranchHash string                 `protobuf:"bytes,5,opt,name=branchHash,proto3" json:"branchHash,omitempty"` //
	Ctime      *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=ctime,proto3" json:"ctime,omitempty"`           // the git commit timestamp of the version
	// contains filtered or unexported fields
}

func (*Patch) Descriptor deprecated added in v0.0.28

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

Deprecated: Use Patch.ProtoReflect.Descriptor instead.

func (*Patch) GetBranchHash added in v0.0.28

func (x *Patch) GetBranchHash() string

func (*Patch) GetBranchName added in v0.0.28

func (x *Patch) GetBranchName() string

func (*Patch) GetCtime added in v0.0.28

func (x *Patch) GetCtime() *timestamppb.Timestamp

func (*Patch) GetData added in v0.0.28

func (x *Patch) GetData() []byte

func (*Patch) GetFilename added in v0.0.28

func (x *Patch) GetFilename() string

func (*Patch) GetRepoPath added in v0.0.28

func (x *Patch) GetRepoPath() string

func (*Patch) ProtoMessage added in v0.0.28

func (*Patch) ProtoMessage()

func (*Patch) ProtoReflect added in v0.0.28

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

func (*Patch) Reset added in v0.0.28

func (x *Patch) Reset()

func (*Patch) String added in v0.0.28

func (x *Patch) String() string

type PatchFilename added in v0.0.28

type PatchFilename []*Patch

func (PatchFilename) Len added in v0.0.28

func (a PatchFilename) Len() int

func (PatchFilename) Less added in v0.0.28

func (a PatchFilename) Less(i, j int) bool

func (PatchFilename) Swap added in v0.0.28

func (a PatchFilename) Swap(i, j int)

type PatchIterator added in v0.0.28

type PatchIterator struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewPatchIterator added in v0.0.28

func NewPatchIterator(things []*Patch) *PatchIterator

NewPatchIterator initializes a new iterator.

func (*PatchIterator) Next added in v0.0.28

func (it *PatchIterator) Next() *Patch

Next() returns the next thing in the array

func (*PatchIterator) Scan added in v0.0.28

func (it *PatchIterator) Scan() bool

Scan moves to the next element and returns false if there are no more things. Use Scan() in a loop, similar to a while loop

for iterator.Scan()
	d := iterator.Next(
	fmt.Println("found UUID:", d.Uuid
}

type Patchs added in v0.0.28

type Patchs struct {
	Uuid            string                 `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`       // `autogenpb:uuid:0703df95-6a38-4422-994b-c55d3d6001f9` // todo: add file support
	Version         string                 `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // could be used for protobuf schema change violations?
	Patchs          []*Patch               `protobuf:"bytes,3,rep,name=Patchs,proto3" json:"Patchs,omitempty"`
	Name            string                 `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`                        //
	Comment         string                 `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"`                  //
	GitAuthorName   string                 `protobuf:"bytes,6,opt,name=gitAuthorName,proto3" json:"gitAuthorName,omitempty"`      //
	GitAuthorEmail  string                 `protobuf:"bytes,7,opt,name=gitAuthorEmail,proto3" json:"gitAuthorEmail,omitempty"`    //
	Ctime           *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=ctime,proto3" json:"ctime,omitempty"`                      // create time of this patchset
	TmpDir          string                 `protobuf:"bytes,9,opt,name=tmpDir,proto3" json:"tmpDir,omitempty"`                    // temp dir
	StartBranchName string                 `protobuf:"bytes,10,opt,name=startBranchName,proto3" json:"startBranchName,omitempty"` //
	EndBranchName   string                 `protobuf:"bytes,11,opt,name=endBranchName,proto3" json:"endBranchName,omitempty"`     //
	StartBranchHash string                 `protobuf:"bytes,12,opt,name=startBranchHash,proto3" json:"startBranchHash,omitempty"` //
	EndBranchHash   string                 `protobuf:"bytes,13,opt,name=endBranchHash,proto3" json:"endBranchHash,omitempty"`     //
	// contains filtered or unexported fields
}

func (*Patchs) All added in v0.0.28

func (all *Patchs) All() *PatchIterator

func (*Patchs) Append added in v0.0.28

func (all *Patchs) Append(newP *Patch) bool

does not enforce any unique fields

func (*Patchs) AppendUniqueFilename added in v0.0.28

func (all *Patchs) AppendUniqueFilename(newP *Patch) bool

enforces Filename is unique

func (*Patchs) DeleteByFilename added in v0.0.28

func (all *Patchs) DeleteByFilename(s string) bool

func (*Patchs) Descriptor deprecated added in v0.0.28

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

Deprecated: Use Patchs.ProtoReflect.Descriptor instead.

func (*Patchs) FindByFilename added in v0.0.28

func (all *Patchs) FindByFilename(s string) *Patch

find a dependancy by the go path

func (*Patchs) FormatJSON added in v0.0.28

func (v *Patchs) FormatJSON() string

human readable JSON

func (*Patchs) FormatTEXT added in v0.0.28

func (v *Patchs) FormatTEXT() string

apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's so great for config files, I'm using it by default to try to fix the problems with it

func (*Patchs) GetComment added in v0.0.28

func (x *Patchs) GetComment() string

func (*Patchs) GetCtime added in v0.0.28

func (x *Patchs) GetCtime() *timestamppb.Timestamp

func (*Patchs) GetEndBranchHash added in v0.0.28

func (x *Patchs) GetEndBranchHash() string

func (*Patchs) GetEndBranchName added in v0.0.28

func (x *Patchs) GetEndBranchName() string

func (*Patchs) GetGitAuthorEmail added in v0.0.28

func (x *Patchs) GetGitAuthorEmail() string

func (*Patchs) GetGitAuthorName added in v0.0.28

func (x *Patchs) GetGitAuthorName() string

func (*Patchs) GetName added in v0.0.28

func (x *Patchs) GetName() string

func (*Patchs) GetPatchs added in v0.0.28

func (x *Patchs) GetPatchs() []*Patch

func (*Patchs) GetStartBranchHash added in v0.0.28

func (x *Patchs) GetStartBranchHash() string

func (*Patchs) GetStartBranchName added in v0.0.28

func (x *Patchs) GetStartBranchName() string

func (*Patchs) GetTmpDir added in v0.0.28

func (x *Patchs) GetTmpDir() string

func (*Patchs) GetUuid added in v0.0.28

func (x *Patchs) GetUuid() string

func (*Patchs) GetVersion added in v0.0.28

func (x *Patchs) GetVersion() string

func (*Patchs) Len added in v0.0.28

func (all *Patchs) Len() int

func (*Patchs) Marshal added in v0.0.28

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

marshal to wire. This is called winning.

func (*Patchs) MarshalJSON added in v0.0.28

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

marshal json

func (*Patchs) ProtoMessage added in v0.0.28

func (*Patchs) ProtoMessage()

func (*Patchs) ProtoReflect added in v0.0.28

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

func (*Patchs) ReplaceFilename added in v0.0.28

func (all *Patchs) ReplaceFilename(newP *Patch) bool

enforces Filename is unique

func (*Patchs) Reset added in v0.0.28

func (x *Patchs) Reset()

func (*Patchs) SortByFilename added in v0.0.28

func (all *Patchs) SortByFilename() *PatchIterator

func (*Patchs) String added in v0.0.28

func (x *Patchs) String() string

func (*Patchs) Unmarshal added in v0.0.28

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

unmarshal from wire. You have won.

func (*Patchs) UnmarshalJSON added in v0.0.28

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

unmarshal json

func (*Patchs) UnmarshalTEXT added in v0.0.28

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

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

type UuidConfigs added in v0.0.23

type UuidConfigs struct {
	Uuid    string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`       // could be useful for /usr/share/file/magic someday?
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // could be used for protobuf schema change violations?
	// contains filtered or unexported fields
}

autogenpb:no-sort

func (*UuidConfigs) Descriptor deprecated added in v0.0.23

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

Deprecated: Use UuidConfigs.ProtoReflect.Descriptor instead.

func (*UuidConfigs) FormatJSON added in v0.0.23

func (v *UuidConfigs) FormatJSON() string

human readable JSON

func (*UuidConfigs) FormatTEXT added in v0.0.23

func (v *UuidConfigs) FormatTEXT() string

apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's so great for config files, I'm using it by default to try to fix the problems with it

func (*UuidConfigs) GetUuid added in v0.0.23

func (x *UuidConfigs) GetUuid() string

func (*UuidConfigs) GetVersion added in v0.0.23

func (x *UuidConfigs) GetVersion() string

func (*UuidConfigs) Marshal added in v0.0.23

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

marshal to wire. This is called winning.

func (*UuidConfigs) MarshalJSON added in v0.0.23

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

marshal json

func (*UuidConfigs) ProtoMessage added in v0.0.23

func (*UuidConfigs) ProtoMessage()

func (*UuidConfigs) ProtoReflect added in v0.0.23

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

func (*UuidConfigs) Reset added in v0.0.23

func (x *UuidConfigs) Reset()

func (*UuidConfigs) String added in v0.0.23

func (x *UuidConfigs) String() string

func (*UuidConfigs) Unmarshal added in v0.0.23

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

unmarshal from wire. You have won.

func (*UuidConfigs) UnmarshalJSON added in v0.0.23

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

unmarshal json

func (*UuidConfigs) UnmarshalTEXT added in v0.0.23

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

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

Jump to

Keyboard shortcuts

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