Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedType indicates an unsupported type ErrUnsupportedType = errors.New("Type is unsupported") // ErrInvalidIntRange indicates an invalid number range ErrInvalidIntRange = errors.New("Number is not in valid range") )
View Source
var ( // ErrMissingMetadataFile indicates a missing metadata.gz file ErrMissingMetadataFile = errors.New("Metadata file is missing") // ErrInvalidName indicates an invalid id in the metadata.gz file ErrInvalidName = errors.New("Metadata file contains an invalid name") // ErrInvalidVersion indicates an invalid version in the metadata.gz file ErrInvalidVersion = errors.New("Metadata file contains an invalid version") )
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct { Name string `json:"name"` Version []VersionRequirement `json:"version"` }
Dependency represents a dependency of a RubyGems package
type MarshalEncoder ¶
type MarshalEncoder struct {
// contains filtered or unexported fields
}
MarshalEncoder mimics Rubys Marshal class. Note: Only supports types used by the RubyGems package registry.
func NewMarshalEncoder ¶
func NewMarshalEncoder(w io.Writer) *MarshalEncoder
NewMarshalEncoder creates a new MarshalEncoder
func (*MarshalEncoder) Encode ¶
func (e *MarshalEncoder) Encode(v interface{}) error
Encode encodes the given type
type Metadata ¶
type Metadata struct { Platform string `json:"platform,omitempty"` Description string `json:"description,omitempty"` Summary string `json:"summary,omitempty"` Authors []string `json:"authors,omitempty"` Licenses []string `json:"licenses,omitempty"` RequiredRubyVersion []VersionRequirement `json:"required_ruby_version,omitempty"` RequiredRubygemsVersion []VersionRequirement `json:"required_rubygems_version,omitempty"` ProjectURL string `json:"project_url,omitempty"` RuntimeDependencies []Dependency `json:"runtime_dependencies,omitempty"` DevelopmentDependencies []Dependency `json:"development_dependencies,omitempty"` }
Metadata represents the metadata of a RubyGems package
type RubyObject ¶
RubyObject is a default Ruby object.
type RubyUserDef ¶
type RubyUserDef struct { Name string Value interface{} }
RubyUserDef is a Ruby object that has a _load function.
type RubyUserMarshal ¶
type RubyUserMarshal struct { Name string Value interface{} }
RubyUserMarshal is a Ruby object that has a marshal_load function.
type VersionRequirement ¶
type VersionRequirement struct { Restriction string `json:"restriction"` Version string `json:"version"` }
VersionRequirement represents a version restriction
Click to show internal directories.
Click to hide internal directories.