Files
ergo/vendor/github.com/mailru/easyjson/unknown_fields.go
T
cloudfodder eb43ff69c4 feat(nostr): nostr-based account registration and verification
Rebuilt the nostr registration feature cleanly on top of current ergo
mainline (origin/master), dropping the stale ergo reversions that were
entangled in the original squashed branch.

- New irc/nostr package: NIP-04/NIP-17 DMs, NIP-05 resolution, relay
  connect/auth, and identifier helpers.
- Registration/verification via nostr: parseCallback auto-detects nostr
  identifiers (NIP-05, npub, hex pubkey) and dispatches a verification DM.
- Nostr-based cloaked hostnames for accounts (opt-in via
  ip-cloaking.nostr-hostnames), applied at the account-cloak sites.
- Config: accounts.registration.nostr-verification and the
  nostr-hostnames cloak option, with matching default.yaml and help text.
- Adds github.com/nbd-wtf/go-nostr and vendored dependencies.
2026-07-28 10:42:09 -07:00

33 lines
799 B
Go

package easyjson
import (
jlexer "github.com/mailru/easyjson/jlexer"
"github.com/mailru/easyjson/jwriter"
)
// UnknownFieldsProxy implemets UnknownsUnmarshaler and UnknownsMarshaler
// use it as embedded field in your structure to parse and then serialize unknown struct fields
type UnknownFieldsProxy struct {
unknownFields map[string][]byte
}
func (s *UnknownFieldsProxy) UnmarshalUnknown(in *jlexer.Lexer, key string) {
if s.unknownFields == nil {
s.unknownFields = make(map[string][]byte, 1)
}
s.unknownFields[key] = in.Raw()
}
func (s UnknownFieldsProxy) MarshalUnknowns(out *jwriter.Writer, first bool) {
for key, val := range s.unknownFields {
if first {
first = false
} else {
out.RawByte(',')
}
out.String(string(key))
out.RawByte(':')
out.Raw(val, nil)
}
}