Documentation
¶
Overview ¶
Package source provides LoadSource reads, writes and updates source information.
Index ¶
- Variables
- type Resolver
- type Source
- type SourceInfo
- func (*SourceInfo) Descriptor() ([]byte, []int)deprecated
- func (x *SourceInfo) GetGit() *SourceInfo_Git
- func (x *SourceInfo) GetHttp() *SourceInfo_HTTP
- func (x *SourceInfo) GetSource() isSourceInfo_Source
- func (x *SourceInfo) GetVersion() string
- func (*SourceInfo) ProtoMessage()
- func (x *SourceInfo) ProtoReflect() protoreflect.Message
- func (x *SourceInfo) Reset()
- func (x *SourceInfo) String() string
- type SourceInfo_Git
- func (*SourceInfo_Git) Descriptor() ([]byte, []int)deprecated
- func (x *SourceInfo_Git) GetCommit() string
- func (x *SourceInfo_Git) GetUrl() string
- func (*SourceInfo_Git) ProtoMessage()
- func (x *SourceInfo_Git) ProtoReflect() protoreflect.Message
- func (x *SourceInfo_Git) Reset()
- func (x *SourceInfo_Git) String() string
- type SourceInfo_Git_
- type SourceInfo_HTTP
- func (*SourceInfo_HTTP) Descriptor() ([]byte, []int)deprecated
- func (x *SourceInfo_HTTP) GetExt() string
- func (x *SourceInfo_HTTP) GetName() []string
- func (x *SourceInfo_HTTP) GetUrl() []string
- func (*SourceInfo_HTTP) ProtoMessage()
- func (x *SourceInfo_HTTP) ProtoReflect() protoreflect.Message
- func (x *SourceInfo_HTTP) Reset()
- func (x *SourceInfo_HTTP) String() string
- type SourceInfo_Http
- type SourceLockFile
- func (*SourceLockFile) Descriptor() ([]byte, []int)deprecated
- func (x *SourceLockFile) GetInfos() map[string]*SourceInfo
- func (x *SourceLockFile) GetLastUpdated() *timestamppb.Timestamp
- func (*SourceLockFile) ProtoMessage()
- func (x *SourceLockFile) ProtoReflect() protoreflect.Message
- func (x *SourceLockFile) Reset()
- func (x *SourceLockFile) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_go_chromium_org_infra_tools_pkgbuild_pkg_spec_source_source_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver interface {
Resolve(ctx context.Context, plat, dir string, src *spec.Spec_Create_Source) (info *SourceInfo, err error)
}
Resolver can resolve the latest valid version from source definition.
func NewResolver ¶
func NewResolver() Resolver
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source represents the source for the package. Version can be resolved or loaded from lock file.
func LoadSource ¶
func LoadSource(dir string, creates []*spec.Spec_Create) *Source
func (*Source) GetInfo ¶
func (s *Source) GetInfo(cipdHostPlatform string) *SourceInfo
func (*Source) PersistInfo ¶
type SourceInfo ¶
type SourceInfo struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Types that are valid to be assigned to Source: // // *SourceInfo_Git_ // *SourceInfo_Http Source isSourceInfo_Source `protobuf_oneof:"source"` // contains filtered or unexported fields }
func (*SourceInfo) Descriptor
deprecated
func (*SourceInfo) Descriptor() ([]byte, []int)
Deprecated: Use SourceInfo.ProtoReflect.Descriptor instead.
func (*SourceInfo) GetGit ¶
func (x *SourceInfo) GetGit() *SourceInfo_Git
func (*SourceInfo) GetHttp ¶
func (x *SourceInfo) GetHttp() *SourceInfo_HTTP
func (*SourceInfo) GetSource ¶
func (x *SourceInfo) GetSource() isSourceInfo_Source
func (*SourceInfo) GetVersion ¶
func (x *SourceInfo) GetVersion() string
func (*SourceInfo) ProtoMessage ¶
func (*SourceInfo) ProtoMessage()
func (*SourceInfo) ProtoReflect ¶
func (x *SourceInfo) ProtoReflect() protoreflect.Message
func (*SourceInfo) Reset ¶
func (x *SourceInfo) Reset()
func (*SourceInfo) String ¶
func (x *SourceInfo) String() string
type SourceInfo_Git ¶
type SourceInfo_Git struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Commit string `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` // contains filtered or unexported fields }
func (*SourceInfo_Git) Descriptor
deprecated
func (*SourceInfo_Git) Descriptor() ([]byte, []int)
Deprecated: Use SourceInfo_Git.ProtoReflect.Descriptor instead.
func (*SourceInfo_Git) GetCommit ¶
func (x *SourceInfo_Git) GetCommit() string
func (*SourceInfo_Git) GetUrl ¶
func (x *SourceInfo_Git) GetUrl() string
func (*SourceInfo_Git) ProtoMessage ¶
func (*SourceInfo_Git) ProtoMessage()
func (*SourceInfo_Git) ProtoReflect ¶
func (x *SourceInfo_Git) ProtoReflect() protoreflect.Message
func (*SourceInfo_Git) Reset ¶
func (x *SourceInfo_Git) Reset()
func (*SourceInfo_Git) String ¶
func (x *SourceInfo_Git) String() string
type SourceInfo_Git_ ¶
type SourceInfo_Git_ struct {
Git *SourceInfo_Git `protobuf:"bytes,2,opt,name=git,proto3,oneof"`
}
type SourceInfo_HTTP ¶
type SourceInfo_HTTP struct { Url []string `protobuf:"bytes,1,rep,name=url,proto3" json:"url,omitempty"` Name []string `protobuf:"bytes,2,rep,name=name,proto3" json:"name,omitempty"` Ext string `protobuf:"bytes,3,opt,name=ext,proto3" json:"ext,omitempty"` // contains filtered or unexported fields }
func (*SourceInfo_HTTP) Descriptor
deprecated
func (*SourceInfo_HTTP) Descriptor() ([]byte, []int)
Deprecated: Use SourceInfo_HTTP.ProtoReflect.Descriptor instead.
func (*SourceInfo_HTTP) GetExt ¶
func (x *SourceInfo_HTTP) GetExt() string
func (*SourceInfo_HTTP) GetName ¶
func (x *SourceInfo_HTTP) GetName() []string
func (*SourceInfo_HTTP) GetUrl ¶
func (x *SourceInfo_HTTP) GetUrl() []string
func (*SourceInfo_HTTP) ProtoMessage ¶
func (*SourceInfo_HTTP) ProtoMessage()
func (*SourceInfo_HTTP) ProtoReflect ¶
func (x *SourceInfo_HTTP) ProtoReflect() protoreflect.Message
func (*SourceInfo_HTTP) Reset ¶
func (x *SourceInfo_HTTP) Reset()
func (*SourceInfo_HTTP) String ¶
func (x *SourceInfo_HTTP) String() string
type SourceInfo_Http ¶
type SourceInfo_Http struct {
Http *SourceInfo_HTTP `protobuf:"bytes,3,opt,name=http,proto3,oneof"`
}
type SourceLockFile ¶
type SourceLockFile struct { Infos map[string]*SourceInfo `` /* 137-byte string literal not displayed */ LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` // contains filtered or unexported fields }
Proto message which reflects the input properties fora the pkgbuild recipe. See more detailed description for each field there.
func (*SourceLockFile) Descriptor
deprecated
func (*SourceLockFile) Descriptor() ([]byte, []int)
Deprecated: Use SourceLockFile.ProtoReflect.Descriptor instead.
func (*SourceLockFile) GetInfos ¶
func (x *SourceLockFile) GetInfos() map[string]*SourceInfo
func (*SourceLockFile) GetLastUpdated ¶
func (x *SourceLockFile) GetLastUpdated() *timestamppb.Timestamp
func (*SourceLockFile) ProtoMessage ¶
func (*SourceLockFile) ProtoMessage()
func (*SourceLockFile) ProtoReflect ¶
func (x *SourceLockFile) ProtoReflect() protoreflect.Message
func (*SourceLockFile) Reset ¶
func (x *SourceLockFile) Reset()
func (*SourceLockFile) String ¶
func (x *SourceLockFile) String() string
Click to show internal directories.
Click to hide internal directories.