scryinfo

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Status_name = map[int32]string{
	0: "OK",
	1: "ERROR",
}
View Source
var Status_value = map[string]int32{
	"OK":    0,
	"ERROR": 1,
}

Functions

func RegisterKeyServiceServer

func RegisterKeyServiceServer(s *grpc.Server, srv KeyServiceServer)

Types

type AddressInfo

type AddressInfo struct {
	Status               Status   `protobuf:"varint,1,opt,name=status,proto3,enum=scryinfo.Status" json:"status,omitempty"`
	Address              string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Msg                  string   `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddressInfo) Descriptor

func (*AddressInfo) Descriptor() ([]byte, []int)

func (*AddressInfo) GetAddress

func (m *AddressInfo) GetAddress() string

func (*AddressInfo) GetMsg

func (m *AddressInfo) GetMsg() string

func (*AddressInfo) GetStatus

func (m *AddressInfo) GetStatus() Status

func (*AddressInfo) ProtoMessage

func (*AddressInfo) ProtoMessage()

func (*AddressInfo) Reset

func (m *AddressInfo) Reset()

func (*AddressInfo) String

func (m *AddressInfo) String() string

func (*AddressInfo) XXX_DiscardUnknown

func (m *AddressInfo) XXX_DiscardUnknown()

func (*AddressInfo) XXX_Marshal

func (m *AddressInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddressInfo) XXX_Merge

func (m *AddressInfo) XXX_Merge(src proto.Message)

func (*AddressInfo) XXX_Size

func (m *AddressInfo) XXX_Size() int

func (*AddressInfo) XXX_Unmarshal

func (m *AddressInfo) XXX_Unmarshal(b []byte) error

type AddressParameter

type AddressParameter struct {
	Password             string   `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	Address              string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddressParameter) Descriptor

func (*AddressParameter) Descriptor() ([]byte, []int)

func (*AddressParameter) GetAddress

func (m *AddressParameter) GetAddress() string

func (*AddressParameter) GetPassword

func (m *AddressParameter) GetPassword() string

func (*AddressParameter) ProtoMessage

func (*AddressParameter) ProtoMessage()

func (*AddressParameter) Reset

func (m *AddressParameter) Reset()

func (*AddressParameter) String

func (m *AddressParameter) String() string

func (*AddressParameter) XXX_DiscardUnknown

func (m *AddressParameter) XXX_DiscardUnknown()

func (*AddressParameter) XXX_Marshal

func (m *AddressParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddressParameter) XXX_Merge

func (m *AddressParameter) XXX_Merge(src proto.Message)

func (*AddressParameter) XXX_Size

func (m *AddressParameter) XXX_Size() int

func (*AddressParameter) XXX_Unmarshal

func (m *AddressParameter) XXX_Unmarshal(b []byte) error

type CipherParameter

type CipherParameter struct {
	Password             string   `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	Address              string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Message              []byte   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CipherParameter) Descriptor

func (*CipherParameter) Descriptor() ([]byte, []int)

func (*CipherParameter) GetAddress

func (m *CipherParameter) GetAddress() string

func (*CipherParameter) GetMessage

func (m *CipherParameter) GetMessage() []byte

func (*CipherParameter) GetPassword

func (m *CipherParameter) GetPassword() string

func (*CipherParameter) ProtoMessage

func (*CipherParameter) ProtoMessage()

func (*CipherParameter) Reset

func (m *CipherParameter) Reset()

func (*CipherParameter) String

func (m *CipherParameter) String() string

func (*CipherParameter) XXX_DiscardUnknown

func (m *CipherParameter) XXX_DiscardUnknown()

func (*CipherParameter) XXX_Marshal

func (m *CipherParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CipherParameter) XXX_Merge

func (m *CipherParameter) XXX_Merge(src proto.Message)

func (*CipherParameter) XXX_Size

func (m *CipherParameter) XXX_Size() int

func (*CipherParameter) XXX_Unmarshal

func (m *CipherParameter) XXX_Unmarshal(b []byte) error

type CipherText

type CipherText struct {
	Status               Status   `protobuf:"varint,1,opt,name=status,proto3,enum=scryinfo.Status" json:"status,omitempty"`
	Data                 []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Msg                  string   `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CipherText) Descriptor

func (*CipherText) Descriptor() ([]byte, []int)

func (*CipherText) GetData

func (m *CipherText) GetData() []byte

func (*CipherText) GetMsg

func (m *CipherText) GetMsg() string

func (*CipherText) GetStatus

func (m *CipherText) GetStatus() Status

func (*CipherText) ProtoMessage

func (*CipherText) ProtoMessage()

func (*CipherText) Reset

func (m *CipherText) Reset()

func (*CipherText) String

func (m *CipherText) String() string

func (*CipherText) XXX_DiscardUnknown

func (m *CipherText) XXX_DiscardUnknown()

func (*CipherText) XXX_Marshal

func (m *CipherText) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CipherText) XXX_Merge

func (m *CipherText) XXX_Merge(src proto.Message)

func (*CipherText) XXX_Size

func (m *CipherText) XXX_Size() int

func (*CipherText) XXX_Unmarshal

func (m *CipherText) XXX_Unmarshal(b []byte) error

type ImportParameter

type ImportParameter struct {
	ContentPassword      string   `protobuf:"bytes,1,opt,name=content_password,json=contentPassword,proto3" json:"content_password,omitempty"`
	ImportPsd            string   `protobuf:"bytes,2,opt,name=import_psd,json=importPsd,proto3" json:"import_psd,omitempty"`
	Content              []byte   `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ImportParameter) Descriptor

func (*ImportParameter) Descriptor() ([]byte, []int)

func (*ImportParameter) GetContent

func (m *ImportParameter) GetContent() []byte

func (*ImportParameter) GetContentPassword

func (m *ImportParameter) GetContentPassword() string

func (*ImportParameter) GetImportPsd

func (m *ImportParameter) GetImportPsd() string

func (*ImportParameter) ProtoMessage

func (*ImportParameter) ProtoMessage()

func (*ImportParameter) Reset

func (m *ImportParameter) Reset()

func (*ImportParameter) String

func (m *ImportParameter) String() string

func (*ImportParameter) XXX_DiscardUnknown

func (m *ImportParameter) XXX_DiscardUnknown()

func (*ImportParameter) XXX_Marshal

func (m *ImportParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ImportParameter) XXX_Merge

func (m *ImportParameter) XXX_Merge(src proto.Message)

func (*ImportParameter) XXX_Size

func (m *ImportParameter) XXX_Size() int

func (*ImportParameter) XXX_Unmarshal

func (m *ImportParameter) XXX_Unmarshal(b []byte) error

type KeyServiceClient

type KeyServiceClient interface {
	//生成地址
	GenerateAddress(ctx context.Context, in *AddressParameter, opts ...grpc.CallOption) (*AddressInfo, error)
	//校验地址
	VerifyAddress(ctx context.Context, in *AddressParameter, opts ...grpc.CallOption) (*AddressInfo, error)
	//内容加密
	ContentEncrypt(ctx context.Context, in *CipherParameter, opts ...grpc.CallOption) (*CipherText, error)
	//内容解密
	ContentDecrypt(ctx context.Context, in *CipherParameter, opts ...grpc.CallOption) (*CipherText, error)
	//消息签名
	Signature(ctx context.Context, in *CipherParameter, opts ...grpc.CallOption) (*CipherText, error)
	//导入keystore文件内容
	ImportKeystore(ctx context.Context, in *ImportParameter, opts ...grpc.CallOption) (*AddressInfo, error)
}

KeyServiceClient is the client API for KeyService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewKeyServiceClient

func NewKeyServiceClient(cc *grpc.ClientConn) KeyServiceClient

type KeyServiceServer

type KeyServiceServer interface {
	//生成地址
	GenerateAddress(context.Context, *AddressParameter) (*AddressInfo, error)
	//校验地址
	VerifyAddress(context.Context, *AddressParameter) (*AddressInfo, error)
	//内容加密
	ContentEncrypt(context.Context, *CipherParameter) (*CipherText, error)
	//内容解密
	ContentDecrypt(context.Context, *CipherParameter) (*CipherText, error)
	//消息签名
	Signature(context.Context, *CipherParameter) (*CipherText, error)
	//导入keystore文件内容
	ImportKeystore(context.Context, *ImportParameter) (*AddressInfo, error)
}

KeyServiceServer is the server API for KeyService service.

type Status

type Status int32
const (
	Status_OK    Status = 0
	Status_ERROR Status = 1
)

func (Status) EnumDescriptor

func (Status) EnumDescriptor() ([]byte, []int)

func (Status) String

func (x Status) String() string

Jump to

Keyboard shortcuts

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