Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotMatched = errors.New("confie: code not matched")
ErrNotMatched occurs when code is not matched
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Storage is a code center Storage }
Config defines the config for confie module
type Envoy ¶
type Envoy struct { // Sender is embedded for sending code Sender // contains filtered or unexported fields }
Envoy can generate code and send to a specific address
type Module ¶
func (*Module) RegisterRoutes ¶
func (m *Module) RegisterRoutes(router fiber.Router)
type Sender ¶
type Sender interface { // Send delivers code to the address Send(address, code string) error // Close releases resource if needed Close() error }
Sender defines an interface to send code with expiration
type Storage ¶
type Storage interface { // Get retrieves code from the storage for the given key. Get(key string) ([]byte, error) // Set stores code in storage with given ttl Set(key string, value []byte, ttl time.Duration) error // Delete removes code in storage Delete(key string) error }
Storage defines behaviors to manage sent code
Click to show internal directories.
Click to hide internal directories.