MCPcopy Create free account
hub / github.com/crewjam/saml / ListLinks

Function ListLinks

example/service.go:60–67  ·  view source on GitHub ↗

ListLinks returns a list of the current user's links

(c web.C, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

58
59// ListLinks returns a list of the current user's links
60func ListLinks(c web.C, w http.ResponseWriter, r *http.Request) {
61 account := r.Header.Get("X-Remote-User")
62 for _, l := range links {
63 if l.Owner == account {
64 fmt.Fprintf(w, "%s\n", l.ShortLink)
65 }
66 }
67}
68
69var (
70 key = []byte(`-----BEGIN RSA PRIVATE KEY-----

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected