class Repo
- Repo
- Reference
- Object
Defined in:
fetchers/github_api.crrepo.cr
repo/owner.cr
repo/ref.cr
repo/resolver.cr
Constant Summary
-
RESOLVERS =
{"git", "github", "gitlab", "bitbucket"}
Constructors
- .new(ref : Ref, shard_id : Int64 | Nil, role : Role = :canonical, metadata : Repo::Metadata = Metadata.new, synced_at : Time | Nil = nil, sync_failed_at : Time | Nil = nil, id : Int64 | Nil = nil)
- .new(resolver : String, url : String, shard_id : Int64 | Nil, role : String = "canonical", metadata = Metadata.new, synced_at : Time | Nil = nil, sync_failed_at : Time | Nil = nil, id : Int64 | Nil = nil)
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#hash(hasher)
See
Object#hash(hasher)
- #id : Int64 | Nil
- #id=(id : Int64 | Nil)
- #id? : Int64 | Nil | Nil
- #metadata : Metadata
-
#ref : Ref
Returns the identifier of this repo, consisting of resolver and url.
-
#role : Role
Returns the role of this repo for the shard (defaults to
canonical
). -
#role=(role : Role)
Returns the role of this repo for the shard (defaults to
canonical
). -
#shard_id : Int64 | Nil
Returns a reference to the shard hosted in this repo.
- #sync_failed_at : Time | Nil
- #synced_at : Time | Nil
Constructor Detail
def self.new(ref : Ref, shard_id : Int64 | Nil, role : Role = :canonical, metadata : Repo::Metadata = Metadata.new, synced_at : Time | Nil = nil, sync_failed_at : Time | Nil = nil, id : Int64 | Nil = nil)
#
def self.new(resolver : String, url : String, shard_id : Int64 | Nil, role : String = "canonical", metadata = Metadata.new, synced_at : Time | Nil = nil, sync_failed_at : Time | Nil = nil, id : Int64 | Nil = nil)
#
Instance Method Detail
def ==(other : self)
#
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.
Returns the role of this repo for the shard (defaults to canonical
).
Returns the role of this repo for the shard (defaults to canonical
).