source

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package source fetches the encrypted regex bundle from the NetEase SDK endpoint, decrypts it, and decodes the msgpack payload into the per-group serialized PCRE2 blobs (name -> sregex).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, url string) ([]byte, error)

Download fetches and decrypts the bundle at url, returning the raw msgpack bytes.

func Fetch

func Fetch(ctx context.Context) (groups map[string][]byte, url string, err error)

Fetch runs the full pipeline: resolve the bundle URL, download, decrypt, decompress, and decode the msgpack into a name -> serialized PCRE2 blob map. It also returns the resolved bundle URL so callers can skip reloads when the URL has not changed.

func ParseGroups

func ParseGroups(packed []byte) (map[string][]byte, error)

ParseGroups decodes the decrypted msgpack payload into a map of group name to its serialized PCRE2 blob (the "sregex" field).

func ResolveURL

func ResolveURL(ctx context.Context) (string, error)

ResolveURL returns the current bundle URL without downloading it. Useful for cheaply checking whether a reload is necessary.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL