yzjapidecryption

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

README

Yunzhijia Open API Decryption Plugin

Yunzhijia Open API Request Body Decryption.

Configuration

To configure this plugin you should add its configuration to the Traefik dynamic configuration as explained here. The following snippet shows how to configure this plugin with the File provider in TOML and YAML: Static:

[experimental.plugins.yzjapidecryption]
  modulename = "github.com/cnmaple/yzjapidecryption"
  version = "v1.0.2"

Dynamic:

[http.middlewares]
  [http.middlewares.my-yzjapidecryption.plugin.yzjapidecryption]
    cloudFlowKey = "Your Yzj API CloudFlowKey"
http:
  middlewares:
   my-yzjapidecryption:
      plugin:
        yzjapidecryption:
          cloudFlowKey: Your Yzj API CloudFlowKey
Options
cloudFlowKey (cloudFlowKey)

The Yzj Open API CloudFlowKey

Documentation

Overview

Package yzjapidecryption is yunzhijia api decryption

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBody

func DecodeBody(body, key string) (string, error)

DecodeBody decode body for key.

func New

func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error)

New created a yzj decryption plugin.

func NewECBDecrypter

func NewECBDecrypter(b cipher.Block) *ecbDecrypter

NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.

Types

type Config

type Config struct {
	CloudFlowKey string
}

Config the plugin configuration.

func CreateConfig

func CreateConfig() *Config

CreateConfig creates the default plugin configuration.

type YzjDecryptionPlugin

type YzjDecryptionPlugin struct {
	// contains filtered or unexported fields
}

YzjDecryptionPlugin yzj decryption plugin.

func (*YzjDecryptionPlugin) ServeHTTP

func (a *YzjDecryptionPlugin) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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