field-codecs
OfficialTransform field values on the fly, maintaining type safety and efficiency.
Authorgo-again
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps address the challenge of transforming struct fields during database interactions, such as encryption or compression, without altering the Go type, ensuring both type safety and efficiency.
Core Features & Use Cases
- Transparent Field Transformation: Encode/decode fields without altering the Go type or wrapping every read/write operation.
- Codec Registration: Easily register custom codecs with a specific tag to transform data as needed.
- Built-in Codecs: Utilize built-in codecs for JSON, GOB, and Unix Time.
- Use Case: For example, storing an encrypted field with a
[]bytetype without wrapping the entire field and affecting type safety.
Quick Start
Register a custom codec for field encryption using 'codec.Register("secretbox", codec.Func(...))' and tag the field 'orm:"value,codec:secretbox"'.
Dependency Matrix
Required Modules
None requiredComponents
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: field-codecs Download link: https://github.com/go-again/liteorm/archive/main.zip#field-codecs Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.