Skip to content

thegrumpylion/webfinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webfinger

Webfinger server & client library for Go

Client

u := "https://example.com" + webfinger.DefaultPath

c, err := webfinger.NewClient(u)
if err != nil {
    panic(err)
}

q := webfinger.NewQuery("https://blog.example.com/article/id/314")

r, err := c.Query(q)
if err != nil {
    panic(err)
}

// do something with r

Server

// implement DB interface or use webfinger.MemDB
func getDB() webfinger.DB {
    ...
}

h := webfinger.NewHandler(getDB(), webfinger.WithAllowOrigin("*"))

http.Handle(webfinger.DefaultPath, h)

http.ListenAndServe(":8080", nil)

About

Webfinger server/client library for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages