MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / RegisterUsersAPI

Function RegisterUsersAPI

internal/serverapi/api.go:131–138  ·  view source on GitHub ↗
(mux *http.ServeMux, usersStore users.Store, nodesStore nodes.Store, inboundStore inbounds.InboundStore, outboundStore outbounds.Store, dial jobs.NodeDialer, applyOpts jobs.ApplyOptions, geoDB *geoip.DB, sesStore PortalSessionStore)

Source from the content-addressed store, hash-verified

129}
130
131func RegisterUsersAPI(mux *http.ServeMux, usersStore users.Store, nodesStore nodes.Store, inboundStore inbounds.InboundStore, outboundStore outbounds.Store, dial jobs.NodeDialer, applyOpts jobs.ApplyOptions, geoDB *geoip.DB, sesStore PortalSessionStore) {
132 base := New(nodesStore)
133 base.inboundStore = inboundStore
134 base.outboundStore = outboundStore
135 a := newUserAPI(usersStore, nodesStore, inboundStore, outboundStore, base, dial, applyOpts, geoDB)
136 a.sessions = sesStore
137 a.Register(mux)
138}
139
140func (a *API) Register(mux *http.ServeMux) {
141 mux.HandleFunc("/v1/nodes", a.handleNodes)

Callers 1

RunFunction · 0.92

Calls 3

newUserAPIFunction · 0.85
NewFunction · 0.70
RegisterMethod · 0.45

Tested by

no test coverage detected