fediri

package
v0.0.0-...-7cc0ef5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsReservedUsername

func IsReservedUsername(username string) bool

Return whether username is a reserved username, that is a name that may not appear as first IRI component because it has other functions.

Types

type IRI

type IRI struct {
	Target *url.URL
}

func ActorIRI

func ActorIRI(actor string) IRI

Generate a new actor IRI.

func FollowersIRI

func FollowersIRI(owner string) IRI

Generate a new followers IRI.

func FollowingIRI

func FollowingIRI(owner string) IRI

Generate a new following IRI.

func InboxIRI

func InboxIRI(owner string) IRI

Generate a new inbox IRI.

func LikedIRI

func LikedIRI(owner string) IRI

Generate a new liked IRI.

func NewIRI

func NewIRI(components ...string) IRI

Construct a new IRI with tailing components.

func OutboxIRI

func OutboxIRI(owner string) IRI

Generate a new outbox IRI.

func RollObjectIRI

func RollObjectIRI() IRI

Generate a new object IRI with a random UUID used as an object id.

func (IRI) Actor

func (iri IRI) Actor() (string, error)

Return the owner of the given IRI. The IRI needs to have the form

*/{username}

where the asterix is the placeholder for the base path.

func (IRI) FollowersOwner

func (iri IRI) FollowersOwner() (string, error)

Return the owner of the given IRI. The IRI needs to have the form

*/{username}/followers

where the asterix is the placeholder for the base path.

func (IRI) FollowingOwner

func (iri IRI) FollowingOwner() (string, error)

Return the owner of the given IRI. The IRI needs to have the form

*/{username}/following

where the asterix is the placeholder for the base path.

func (IRI) InboxOwner

func (iri IRI) InboxOwner() (string, error)

Return the owner of the given IRI. The IRI needs to have the form

*/{username}/inbox

where the asterix is the placeholder for the base path.

func (IRI) LikedOwner

func (iri IRI) LikedOwner() (string, error)

Return the owner of the given IRI. The IRI needs to have the form

*/{username}/liked

where the asterix is the placeholder for the base path.

func (IRI) Object

func (iri IRI) Object() (string, error)

Return the object id of the given IRI. The IRI needs to have the form

*/storage/{id}

where the asterix is the placeholder for the base path.

func (IRI) OutboxOwner

func (iri IRI) OutboxOwner() (string, error)

Return the owner of the given IRI. The IRI needs to have the form

*/{username}/outbox //

where the asterix is the placeholder for the base path.

func (IRI) Owner

func (iri IRI) Owner() (string, error)

Return the owner of this IRI.

func (IRI) String

func (iri IRI) String() string

func (IRI) URL

func (iri IRI) URL() *url.URL

Return the underlying URL for use in other functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL