Xgit v0.8.0 Xgit.Tag View Source
Represents a git tag
object in memory.
Link to this section Summary
Types
Error response codes returned by from_object/1
.
This struct describes a single tag
object so it can be manipulated in memory.
Functions
Renders a tag structure from an Xgit.Object
.
Renders this tag structure into a corresponding Xgit.Object
.
Return true
if the value is a tag struct that is valid.
Return true
if the value provided is valid as a tag name.
Link to this section Types
from_object_reason()
View Sourcefrom_object_reason() :: :not_a_tag | :invalid_tag
Error response codes returned by from_object/1
.
t()
View Sourcet() :: %Xgit.Tag{ message: [byte()], name: [byte()], object: Xgit.ObjectId.t(), tagger: Xgit.PersonIdent.t() | nil, type: Xgit.ObjectType.t() }
This struct describes a single tag
object so it can be manipulated in memory.
Struct Members
:object
: (Xgit.ObjectId
) object referenced by this tag:type
: (Xgit.ObjectType
) type of the target object:name
: (bytelist) name of the tag:tagger
: (Xgit.PersonIdent
) person who created the tag:message
: (bytelist) user-entered tag message (encoding unspecified)
TO DO: Support signatures and other extensions. https://github.com/elixir-git/xgit/issues/202
Link to this section Functions
from_object(object)
View Sourcefrom_object(object :: Xgit.Object.t()) :: {:ok, tag :: t()} | {:error, from_object_reason()}
Renders a tag structure from an Xgit.Object
.
Return Values
{:ok, tag}
if the object contains a valid tag
object.
{:error, :not_a_tag}
if the object contains an object of a different type.
{:error, :invalid_tag}
if the object says that is of type tag
, but
can not be parsed as such.
Renders this tag structure into a corresponding Xgit.Object
.
If the tag structure is not valid, will raise ArgumentError
.
Return true
if the value is a tag struct that is valid.
Return true
if the value provided is valid as a tag name.