class Repo

Defined in:

fetchers/github_api.cr
repo.cr
repo/owner.cr
repo/ref.cr
repo/resolver.cr

Constant Summary

RESOLVERS = {"git", "github", "gitlab", "bitbucket"}

Constructors

Instance Method Summary

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) #

[View source]
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) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def id : Int64 | Nil #

def id=(id : Int64 | Nil) #

[View source]
def id? : Int64 | Nil | Nil #

def metadata : Metadata #

[View source]
def ref : Ref #

Returns the identifier of this repo, consisting of resolver and url.


[View source]
def role : Role #

Returns the role of this repo for the shard (defaults to canonical).


[View source]
def role=(role : Role) #

Returns the role of this repo for the shard (defaults to canonical).


[View source]
def shard_id : Int64 | Nil #

Returns a reference to the shard hosted in this repo.


[View source]
def sync_failed_at : Time | Nil #

[View source]
def synced_at : Time | Nil #

[View source]