Documentation ¶
Index ¶
- Constants
- Variables
- func ActorIRIFor(scheme, host string, k PathKey, c Actor) *url.URL
- func ActorPathFor(k PathKey, c Actor) string
- func AddPageParams(base *url.URL, offset, n int) *url.URL
- func GetNumOrDefault(u *url.URL, def, max int) int
- func GetOffsetOrDefault(u *url.URL, def int) int
- func IRIForActorID(k PathKey, actorID *url.URL) (*url.URL, error)
- func IsFollowersPath(id *url.URL) bool
- func IsFollowingPath(id *url.URL) bool
- func IsGetCollectionEnd(u *url.URL) bool
- func IsGetCollectionPage(u *url.URL) bool
- func IsInstanceActorPath(id *url.URL) bool
- func IsLikedPath(id *url.URL) bool
- func IsUserPath(id *url.URL) bool
- func Normalize(i *url.URL) *url.URL
- func NormalizeAsIRI(s string) (*url.URL, error)
- func Route(k PathKey) string
- func UUIDIRIFor(scheme string, host string, k PathKey, uuid UUID) *url.URL
- func UUIDPathFor(k PathKey, uuid UUID) string
- func UserIRIFor(scheme, host string, k PathKey, c Actor) *url.URL
- func UserPathFor(k PathKey, c Actor) string
- type Actor
- type PathKey
- type UUID
Constants ¶
View Source
const ( UserPathKey PathKey = "users" InboxPathKey = "inbox" InboxFirstPathKey = "inboxFirst" InboxLastPathKey = "inboxLast" OutboxPathKey = "outbox" OutboxFirstPathKey = "outboxFirst" OutboxLastPathKey = "outboxLast" FollowersPathKey = "followers" FollowersFirstPathKey = "followersFirst" FollowersLastPathKey = "followersLast" FollowingPathKey = "following" FollowingFirstPathKey = "followingFirst" FollowingLastPathKey = "followingLast" LikedPathKey = "liked" LikedFirstPathKey = "likedFirst" LikedLastPathKey = "likedLast" HttpSigPubKeyKey = "httpsigPubKey" )
Variables ¶
View Source
var AllActors []Actor = []Actor{InstanceActor}
Functions ¶
func ActorPathFor ¶
func AddPageParams ¶
AddPageParams overwrites the query string of a base URL and returns a copy with the pagination parameters set.
func GetNumOrDefault ¶
GetNumOrDefault returns the number requested in the IRI, or default if no value or an invalid value is specified. If the requested amount is greater than the max, the maximum is returned instead.
func GetOffsetOrDefault ¶
GetOffsetOrDefault returns the offset requested in the IRI, or default if no value or an invalid value is specified.
func IsFollowersPath ¶
func IsFollowingPath ¶
func IsGetCollectionEnd ¶
IsGetCollectionEnd returns true when the IRI requests the last page for an OrderedCollection-style of IRI.
func IsGetCollectionPage ¶
IsGetCollectionPage returns true when the IRI requests pagination for an OrderedCollection-style of IRI.
func IsInstanceActorPath ¶
func IsLikedPath ¶
func IsUserPath ¶
func UUIDPathFor ¶
func UserPathFor ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.