Documentation
¶
Index ¶
- Variables
- func FindGoSrc() (string, error)
- func RepoHeader() string
- type ByRepoPath
- type Repo
- func (r *Repo) Age(newP *Repo) time.Duration
- func (*Repo) Descriptor() ([]byte, []int)deprecated
- func (x *Repo) GetDebName() string
- func (x *Repo) GetDevelBranch() string
- func (x *Repo) GetDirectory() bool
- func (x *Repo) GetFavorite() bool
- func (x *Repo) GetGoPath() string
- func (x *Repo) GetInteresting() bool
- func (x *Repo) GetMasterBranch() string
- func (x *Repo) GetPrivate() bool
- func (x *Repo) GetReadOnly() bool
- func (x *Repo) GetUserBranch() string
- func (x *Repo) GetVerstamp() *timestamppb.Timestamp
- func (x *Repo) GetWritable() bool
- func (m *Repo) Marshal() ([]byte, error)
- func (*Repo) ProtoMessage()
- func (x *Repo) ProtoReflect() protoreflect.Message
- func (x *Repo) Reset()
- func (x *Repo) String() string
- func (m *Repo) Unmarshal(data []byte) error
- type RepoIterator
- type Repos
- func (r *Repos) All() *RepoIterator
- func (r *Repos) Append(newP *Repo) bool
- func (c *Repos) ConfigLoad() error
- func (m *Repos) ConfigSave() error
- func (all *Repos) DebName(gopath string) string
- func (all *Repos) DeleteByPath(gopath string) *Repo
- func (*Repos) Descriptor() ([]byte, []int)deprecated
- func (r *Repos) FindByPath(gopath string) *Repo
- func (p *Repos) FormatJSON() string
- func (p *Repos) FormatTEXT() string
- func (x *Repos) GetRepos() []*Repo
- func (x *Repos) GetUuid() string
- func (x *Repos) GetVersion() string
- func (all *Repos) IsPrivate(thing string) bool
- func (all *Repos) IsReadOnly(gopath string) bool
- func (r *Repos) Len() int
- func (m *Repos) Marshal() ([]byte, error)
- func (p *Repos) MarshalJSON() ([]byte, error)
- func (all *Repos) PrintTable()
- func (*Repos) ProtoMessage()
- func (x *Repos) ProtoReflect() protoreflect.Message
- func (x *Repos) Reset()
- func (all *Repos) SampleConfig()
- func (r *Repos) SortByPath() *RepoIterator
- func (x *Repos) String() string
- func (m *Repos) Unmarshal(data []byte) error
- func (p *Repos) UnmarshalJSON(data []byte) error
- func (p *Repos) UnmarshalTEXT(data []byte) error
- func (all *Repos) UpdateGoPath(name string, gopath string) bool
Constants ¶
This section is empty.
Variables ¶
var File_repo_proto protoreflect.FileDescriptor
Functions ¶
func RepoHeader ¶ added in v0.0.2
func RepoHeader() string
Types ¶
type ByRepoPath ¶ added in v0.0.2
type ByRepoPath []*Repo
func (ByRepoPath) Len ¶ added in v0.0.2
func (a ByRepoPath) Len() int
func (ByRepoPath) Less ¶ added in v0.0.2
func (a ByRepoPath) Less(i, j int) bool
func (ByRepoPath) Swap ¶ added in v0.0.2
func (a ByRepoPath) Swap(i, j int)
type Repo ¶ added in v0.0.2
type Repo struct { GoPath string `protobuf:"bytes,1,opt,name=goPath,proto3" json:"goPath,omitempty"` // 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 MasterBranch string `protobuf:"bytes,8,opt,name=masterBranch,proto3" json:"masterBranch,omitempty"` // git 'main' or 'master' branch name DevelBranch string `protobuf:"bytes,9,opt,name=develBranch,proto3" json:"develBranch,omitempty"` // whatever the git 'devel' branch name is UserBranch string `protobuf:"bytes,10,opt,name=userBranch,proto3" json:"userBranch,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 // 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 (*Repo) Descriptor
deprecated
added in
v0.0.2
func (*Repo) GetDebName ¶ added in v0.0.4
func (*Repo) GetDevelBranch ¶ added in v0.0.2
func (*Repo) GetDirectory ¶ added in v0.0.2
func (*Repo) GetFavorite ¶ added in v0.0.2
func (*Repo) GetInteresting ¶ added in v0.0.2
func (*Repo) GetMasterBranch ¶ added in v0.0.2
func (*Repo) GetPrivate ¶ added in v0.0.2
func (*Repo) GetReadOnly ¶ added in v0.0.2
func (*Repo) GetUserBranch ¶ added in v0.0.2
func (*Repo) GetVerstamp ¶ added in v0.0.2
func (x *Repo) GetVerstamp() *timestamppb.Timestamp
func (*Repo) GetWritable ¶ added in v0.0.2
func (*Repo) ProtoMessage ¶ added in v0.0.2
func (*Repo) ProtoMessage()
func (*Repo) ProtoReflect ¶ added in v0.0.2
func (x *Repo) ProtoReflect() protoreflect.Message
type RepoIterator ¶
func NewRepoIterator ¶
func NewRepoIterator(packs []*Repo) *RepoIterator
NewRepoIterator initializes a new iterator.
func (*RepoIterator) Scan ¶
func (it *RepoIterator) Scan() bool
Scan moves to the next element and returns false if there are no more packs.
type Repos ¶ added in v0.0.2
type Repos 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? Repos []*Repo `protobuf:"bytes,3,rep,name=repos,proto3" json:"repos,omitempty"` // contains filtered or unexported fields }
TODO: autogen 'Repos'
func (*Repos) All ¶ added in v0.0.2
func (r *Repos) All() *RepoIterator
func (*Repos) ConfigLoad ¶ added in v0.0.2
load the ~/.config/forge/ files
func (*Repos) ConfigSave ¶ added in v0.0.2
write to ~/.config/forge/ unless ENV{FORGE_HOME} is set
func (*Repos) DebName ¶ added in v0.0.4
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 (*Repos) DeleteByPath ¶ added in v0.0.2
func (*Repos) Descriptor
deprecated
added in
v0.0.2
func (*Repos) FindByPath ¶ added in v0.0.2
find a repo by path
func (*Repos) FormatTEXT ¶ added in v0.0.2
apparently this isn't supposed to be used? https://protobuf.dev/reference/go/faq/#unstable-text this is a shame because this is much nicer output than JSON Format() TODO: fix things so this is the default
func (*Repos) GetVersion ¶ added in v0.0.2
func (*Repos) IsPrivate ¶ added in v0.0.2
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 (*Repos) IsReadOnly ¶ added in v0.0.2
returns true if gopath is readonly() will attempt to match IsWritable("foo") against anything ending in "foo"
func (*Repos) MarshalJSON ¶ added in v0.0.2
marshal json
func (*Repos) PrintTable ¶ added in v0.0.3
func (all *Repos) PrintTable()
print a human readable table to STDOUT
func (*Repos) ProtoMessage ¶ added in v0.0.2
func (*Repos) ProtoMessage()
func (*Repos) ProtoReflect ¶ added in v0.0.2
func (x *Repos) ProtoReflect() protoreflect.Message
func (*Repos) SampleConfig ¶ added in v0.0.2
func (all *Repos) SampleConfig()
func (*Repos) SortByPath ¶ added in v0.0.2
func (r *Repos) SortByPath() *RepoIterator
func (*Repos) UnmarshalJSON ¶ added in v0.0.2
unmarshal
func (*Repos) UnmarshalTEXT ¶ added in v0.0.2
unmarshalTEXT