Documentation
¶
Index ¶
- Constants
- Variables
- func GenActor(domain string) *url.URL
- func GenAppAdminBlockExport() string
- func GenAppAdminBlockExportCSV() string
- func GenAppAdminBlockExportJSON() string
- func GenAppAdminHomePath() string
- func GenAppAdminInstanceViewPath(t string) string
- func GenAppHomePath() string
- func GenAppLogPath() string
- func GenAppLoginPath() string
- func GenAppLogoutPath() string
- func GenAppSettingsPath() string
- func GenCallbackOauth(domain, instanceToken string) *url.URL
- func GenFollowers(d string) string
- func GenFollowing(d string) string
- func GenInbox(domain string) *url.URL
- func GenNodeinfo20(d string) string
- func GenPublicKey(d string) string
- func GenWellKnownNodeInfoURL(d string) *url.URL
Constants ¶
const ( // PartActor is the noun used in a path for an actor PartActor = "actor" // PartAdmin is used in a path for administrative tasks. PartAdmin = "admin" // PartAccount is used in a path for account tasks. PartAccount = "account" // PartApp is the noun used in a path for a web app PartApp = "app" // PartBlock is used in a path for block. PartBlock = "block" // PartBlocks is used in a path for blocks. PartBlocks = "blocks" // PartCallback is used in a path for callback. PartCallback = "callback" // PartExport is used in a path for export. PartExport = "export" // PartFollowers is the noun used in a path for an actor's followers PartFollowers = "followers" // PartFollowing is the noun used in a path for actors following an actor PartFollowing = "following" // PartInbox is the noun used in a path for an actor's inbox PartInbox = "inbox" // PartInstance is used in a path for instances. PartInstance = "instance" // PartJob is used in a path for job. PartJob = "job" // PartLog is used in a path for logs. PartLog = "log" // PartLogin is used in a path for login. PartLogin = "login" // PartLogout is used in a path for logout. PartLogout = "logout" // PartNodeinfo is the noun used in a path for a node info object PartNodeinfo = "nodeinfo" // PartOauth is used in a path for oauth. PartOauth = "oauth" // PartPublicKey is the noun used in a path for an actor's public key PartPublicKey = "main-key" // PartSettings is used in a path for settings page. PartSettings = "settings" // PartStatistics is used in a path for stats pages. PartStatistics = "stats" // PartWebFinger is the noun used in a path for web finger PartWebFinger = "webfinger" // PartWellKnown is the noun used in a well known path PartWellKnown = ".well-known" )
const ( // APActor is the path to the relay actor APActor = "/" + PartActor // APInbox is the path to the relay inbox APInbox = "/" + PartInbox // APNodeInfo20 is the path to the node info 2.0 schema APNodeInfo20 = "/" + PartNodeinfo + "/2.0" // APWellKnownNodeInfo is the path to the well known node info endpoint APWellKnownNodeInfo = "/" + PartWellKnown + "/" + PartNodeinfo // APWellKnownWebFinger is the path to the well known web finger endpoint APWellKnownWebFinger = "/" + PartWellKnown + "/" + PartWebFinger )
const ( // App is the path for the web app. App = "/" + PartApp // AppBlocks is the path for the blocks page. AppBlocks = App + AppSubBlocks // AppSubBlocks is the sub path for the blocks page. AppSubBlocks = "/" + PartBlocks // AppSubCallbackOauth is the sub path for an oauth callback. AppSubCallbackOauth = "/" + PartCallback + "/" + PartOauth + "/" + VarInstance // AppPreCallbackOauth is the prefix path for an oauth callback. AppPreCallbackOauth = App + "/" + PartCallback + "/" + PartOauth + "/" // AppHome is the path for the home page. AppHome = App + AppSubHome // AppSubHome is the sub path for the home page. AppSubHome = "/" // AppInstance is the path for the login page. AppInstance = App + AppSubInstance // AppSubInstance is the sub path for the login page. AppSubInstance = "/" + PartInstance // AppLog is the path for the login page. AppLog = App + AppSubLog // AppSubLog is the sub path for the login page. AppSubLog = "/" + PartLog // AppLogin is the path for the login page. AppLogin = App + AppSubLogin // AppSubLogin is the sub path for the login page. AppSubLogin = "/" + PartLogin // AppLogout is the path for the logout page. AppLogout = App + AppSubLogout // AppSubLogout is the sub path for the logout page. AppSubLogout = "/" + PartLogout // AppSettings is the path for the settings page. AppSettings = App + AppSubSettings // AppSubSettings is the sub path for the settings page. AppSubSettings = "/" + PartSettings // AppAdmin is the path for the admin page. AppAdmin = App + "/" + PartAdmin // AppSubAdmin is the sub path for the admin page. AppSubAdmin = "/" + PartAdmin // AppAdminAccount is the path for the admin account page. AppAdminAccount = AppAdmin + AppAdminSubAccount // AppAdminSubAccount is the sub path for the admin account page. AppAdminSubAccount = "/" + PartAccount // AppAdminBlock is the path for the admin blocks page. AppAdminBlock = AppAdmin + AppAdminSubBlock // AppAdminSubBlock is the sub path for the admin blocks page. AppAdminSubBlock = "/" + PartBlock // AppAdminBlockExport is the path for the admin blocks export page. AppAdminBlockExport = AppAdmin + AppAdminSubBlockExport // AppAdminSubBlockExport is the sub path for the admin blocks export page. AppAdminSubBlockExport = AppAdminSubBlock + "/" + PartExport // AppAdminBlockExportCSV is the path for the admin blocks export page. AppAdminBlockExportCSV = AppAdmin + AppAdminSubBlockExportCSV // AppAdminSubBlockExportCSV is the sub path for the admin blocks export page. AppAdminSubBlockExportCSV = AppAdminSubBlockExport + "." + string(libhttp.SuffixTextCSV) // AppAdminBlockExportJSON is the path for the admin blocks export page. AppAdminBlockExportJSON = AppAdmin + AppAdminSubBlockExportJSON // AppAdminSubBlockExportJSON is the sub path for the admin blocks export page. AppAdminSubBlockExportJSON = AppAdminSubBlockExport + "." + string(libhttp.SuffixAppJSON) // AppAdminHome is the path for the home page. AppAdminHome = AppAdmin + AppAdminSubHome // AppAdminSubHome is the sub path for the home page. AppAdminSubHome = "/" // AppAdminInstance is the path for the admin instances page. AppAdminInstance = AppAdmin + AppAdminSubInstance // AppAdminSubInstance is the sub path for the admin instances page. AppAdminSubInstance = "/" + PartInstance // AppAdminPreInstanceView is the prefix path for the admin instance view page. AppAdminPreInstanceView = AppAdmin + AppAdminSubInstance + "/" // AppAdminSubInstanceView is the sub path for the admin instance view page. AppAdminSubInstanceView = AppAdminSubInstance + "/" + VarInstance // AppAdminJob is the path for the admin jobs page. AppAdminJob = AppAdmin + AppAdminSubJob // AppAdminSubJob is the sub path for the admin jobs page. AppAdminSubJob = "/" + PartJob // AppAdminStatistics is the path for the admin stats page. AppAdminStatistics = AppAdmin + AppAdminSubStatistics // AppAdminSubStatistics is the sub path for the admin stats page. AppAdminSubStatistics = "/" + PartStatistics )
const ( // VarInstanceID is the id of the instance variable. VarInstanceID = "instance" // VarInstance is the var path of the instance variable. VarInstance = "{" + VarInstanceID + ":" + reToken + "}" )
const (
// Robots is the path to the relay actor
Robots = "/robots.txt"
)
Variables ¶
var ( // ReAppAdminPre matches the admin home page. ReAppAdminPre = regexp.MustCompile(fmt.Sprintf(`^?%s`, AppAdmin)) // ReAppAdminHome matches the admin home page. ReAppAdminHome = regexp.MustCompile(fmt.Sprintf(`^?%s$`, AppAdminHome)) // ReAppAdminAccountPre matches the admin instances page. ReAppAdminAccountPre = regexp.MustCompile(fmt.Sprintf(`^?%s`, AppAdminAccount)) // ReAppAdminBlockPre matches the admin block page. ReAppAdminBlockPre = regexp.MustCompile(fmt.Sprintf(`^?%s`, AppAdminBlock)) // ReAppAdminInstancesPre matches the admin instances page. ReAppAdminInstancesPre = regexp.MustCompile(fmt.Sprintf(`^?%s`, AppAdminInstance)) // ReAppAdminJobPre matches the admin jobs page. ReAppAdminJobPre = regexp.MustCompile(fmt.Sprintf(`^?%s`, AppAdminJob)) // ReAppAdminStatisticsPre matches the admin statistics page. ReAppAdminStatisticsPre = regexp.MustCompile(fmt.Sprintf(`^?%s`, AppAdminStatistics)) // ReAppBlocks matches the blocks page. ReAppBlocks = regexp.MustCompile(fmt.Sprintf(`^?%s$`, AppBlocks)) // ReAppHome matches the Home page. ReAppHome = regexp.MustCompile(fmt.Sprintf(`^?%s$`, AppHome)) // ReAppInstance matches the my instance page. ReAppInstance = regexp.MustCompile(fmt.Sprintf(`^?%s$`, AppInstance)) // ReAppSettings matches the settings page. ReAppSettings = regexp.MustCompile(fmt.Sprintf(`^?%s$`, AppSettings)) )
Functions ¶
func GenAppAdminBlockExport ¶
func GenAppAdminBlockExport() string
GenAppAdminBlockExport returns a path for the admin block export page.
func GenAppAdminBlockExportCSV ¶
func GenAppAdminBlockExportCSV() string
GenAppAdminBlockExportCSV returns a path for the admin block export page.
func GenAppAdminBlockExportJSON ¶
func GenAppAdminBlockExportJSON() string
GenAppAdminBlockExportJSON returns a path for the admin block export page.
func GenAppAdminHomePath ¶
func GenAppAdminHomePath() string
GenAppAdminHomePath returns a path for the admin home page.
func GenAppAdminInstanceViewPath ¶ added in v0.4.0
GenAppAdminInstanceViewPath returns a path for the admin instance view page.
func GenAppLogPath ¶ added in v0.3.0
func GenAppLogPath() string
GenAppLogPath returns a path for the log page.
func GenAppLoginPath ¶
func GenAppLoginPath() string
GenAppLoginPath returns a path for the login page.
func GenAppLogoutPath ¶
func GenAppLogoutPath() string
GenAppLogoutPath returns a path for the login page.
func GenAppSettingsPath ¶ added in v0.2.0
func GenAppSettingsPath() string
GenAppSettingsPath returns a path for the settings page.
func GenCallbackOauth ¶
GenCallbackOauth returns a url for a callback oauth
func GenFollowers ¶
GenFollowers returns a url for an actor's followers
func GenFollowing ¶
GenFollowing returns a url for actors following an actor
func GenNodeinfo20 ¶
GenNodeinfo20 returns a url for an nodeinfo 2.0 url
func GenPublicKey ¶
GenPublicKey returns a url for an actor's public key
func GenWellKnownNodeInfoURL ¶
GenWellKnownNodeInfoURL returns a url for well known node info url
Types ¶
This section is empty.