keystore

package
v0.0.0-...-b22f859 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeyBean_Admin_DEFAULT map[string]*UserBean
View Source
var KeyBean_Client_DEFAULT map[string]*UserBean
View Source
var KeyBean_Mq_DEFAULT map[string]*UserBean
View Source
var KeyBean_Other_DEFAULT map[string]string
View Source
var KeyStore *_keyStore
View Source
var ServerCrt = `` /* 1211-byte string literal not displayed */
View Source
var ServerKey = `` /* 1674-byte string literal not displayed */
View Source
var StoreAdmin = NewStoreAdmin()

Functions

func Init

func Init()

func InitKey

func InitKey(dir string) (err error)

func NewKeyStore

func NewKeyStore(dir string, name string) (ks *_keyStore, err error)

func NewStoreAdmin

func NewStoreAdmin() *storeAdmin

func RsaDecrypt

func RsaDecrypt(cipherText []byte, privatekeypath string) (msg []byte, err error)

func RsaEncrypt

func RsaEncrypt(msg []byte, publickeypath string) (cipherText []byte, err error)

Types

type KeyBean

type KeyBean struct {
	Admin  map[string]*UserBean `thrift:"admin,1" db:"admin" json:"admin,omitempty"`
	Client map[string]*UserBean `thrift:"client,2" db:"client" json:"client,omitempty"`
	Mq     map[string]*UserBean `thrift:"mq,3" db:"mq" json:"mq,omitempty"`
	Other  map[string]string    `thrift:"other,4" db:"other" json:"other,omitempty"`
}

Attributes:

  • Admin
  • Client
  • Mq
  • Other

func NewKeyBean

func NewKeyBean() *KeyBean

func (*KeyBean) Equals

func (p *KeyBean) Equals(other *KeyBean) bool

func (*KeyBean) GetAdmin

func (p *KeyBean) GetAdmin() map[string]*UserBean

func (*KeyBean) GetClient

func (p *KeyBean) GetClient() map[string]*UserBean

func (*KeyBean) GetMq

func (p *KeyBean) GetMq() map[string]*UserBean

func (*KeyBean) GetOther

func (p *KeyBean) GetOther() map[string]string

func (*KeyBean) IsSetAdmin

func (p *KeyBean) IsSetAdmin() bool

func (*KeyBean) IsSetClient

func (p *KeyBean) IsSetClient() bool

func (*KeyBean) IsSetMq

func (p *KeyBean) IsSetMq() bool

func (*KeyBean) IsSetOther

func (p *KeyBean) IsSetOther() bool

func (*KeyBean) Read

func (p *KeyBean) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*KeyBean) ReadField1

func (p *KeyBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*KeyBean) ReadField2

func (p *KeyBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*KeyBean) ReadField3

func (p *KeyBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*KeyBean) ReadField4

func (p *KeyBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error

func (*KeyBean) String

func (p *KeyBean) String() string

func (*KeyBean) Validate

func (p *KeyBean) Validate() error

func (*KeyBean) Write

func (p *KeyBean) Write(ctx context.Context, oprot thrift.TProtocol) error

type UserBean

type UserBean struct {
	Name string `thrift:"name,1,required" db:"name" json:"name"`
	Pwd  string `thrift:"pwd,2,required" db:"pwd" json:"pwd"`
	Type int8   `thrift:"type,3,required" db:"type" json:"type"`
}

Attributes:

  • Name
  • Pwd
  • Type

func NewUserBean

func NewUserBean() *UserBean

func (*UserBean) Equals

func (p *UserBean) Equals(other *UserBean) bool

func (*UserBean) GetName

func (p *UserBean) GetName() string

func (*UserBean) GetPwd

func (p *UserBean) GetPwd() string

func (*UserBean) GetType

func (p *UserBean) GetType() int8

func (*UserBean) Read

func (p *UserBean) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*UserBean) ReadField1

func (p *UserBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*UserBean) ReadField2

func (p *UserBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*UserBean) ReadField3

func (p *UserBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*UserBean) String

func (p *UserBean) String() string

func (*UserBean) Validate

func (p *UserBean) Validate() error

func (*UserBean) Write

func (p *UserBean) Write(ctx context.Context, oprot thrift.TProtocol) error

Jump to

Keyboard shortcuts

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