internal

package
v0.0.0-...-8e9dc2b Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(tb testing.TB, condition bool, msg string, v ...interface{})

Assert fails the test if the condition is false.

func Equals

func Equals(tb testing.TB, exp, act interface{})

Equals fails the test if exp is not equal to act.

func GetSecretKey

func GetSecretKey() ([]byte, error)

GetSecretKey create 32 bytes long secret key for pw encryption/decryption

func Ok

func Ok(tb testing.TB, err error)

Ok fails the test if an err is not nil.

func PwDecrypt

func PwDecrypt(encrypted, byteSecret []byte) (string, error)

PwDecrypt decrypt tenant passwords

func PwEncrypt

func PwEncrypt(bytePw, byteSecret []byte) ([]byte, error)

PwEncrypt encrypt tenant passwords

func RegisterSapHistoryServiceServer

func RegisterSapHistoryServiceServer(s *grpc.Server, srv SapHistoryServiceServer)

Types

type Badger

type Badger struct {
	Path    string // Filepath to the data file.
	Options badger.Options
	// contains filtered or unexported fields
}

Badger - needed infos for one badger db

func GetStoreRo

func GetStoreRo(filePath string) (*Badger, error)

GetStoreRo - return readonly store

func GetStoreRw

func GetStoreRw(filePath string) (*Badger, error)

GetStoreRw - return read/write store

func (*Badger) Close

func (s *Badger) Close() error

Close - close and shutdown the store.

func (*Badger) DeleteValue

func (s *Badger) DeleteValue(key []byte) error

DeleteValue - delete a single value

func (*Badger) FindMatchingKey

func (s *Badger) FindMatchingKey(ts string, direction int32) ([]byte, error)

FindMatchingKey - find correct key depending on timestamp and direction

func (*Badger) GetValue

func (s *Badger) GetValue(key []byte) ([]byte, error)

GetValue - return a single value

func (*Badger) GetValues

func (s *Badger) GetValues() (map[string][]byte, error)

GetValues - return all key,value pairs of a database as map

func (*Badger) Open

func (s *Badger) Open() error

Open - open and initialize the store.

func (*Badger) SetValue

func (s *Badger) SetValue(key, value []byte) error

SetValue - insert a single key with value

type D1StringList

type D1StringList struct {
	Data1                []string `protobuf:"bytes,1,rep,name=Data1,proto3" json:"Data1,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*D1StringList) Descriptor

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

func (*D1StringList) GetData1

func (m *D1StringList) GetData1() []string

func (*D1StringList) ProtoMessage

func (*D1StringList) ProtoMessage()

func (*D1StringList) Reset

func (m *D1StringList) Reset()

func (*D1StringList) String

func (m *D1StringList) String() string

func (*D1StringList) XXX_DiscardUnknown

func (m *D1StringList) XXX_DiscardUnknown()

func (*D1StringList) XXX_Marshal

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

func (*D1StringList) XXX_Merge

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

func (*D1StringList) XXX_Size

func (m *D1StringList) XXX_Size() int

func (*D1StringList) XXX_Unmarshal

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

type D2StringList

type D2StringList struct {
	Data2                []*D1StringList `protobuf:"bytes,1,rep,name=Data2,proto3" json:"Data2,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*D2StringList) Descriptor

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

func (*D2StringList) GetData2

func (m *D2StringList) GetData2() []*D1StringList

func (*D2StringList) ProtoMessage

func (*D2StringList) ProtoMessage()

func (*D2StringList) Reset

func (m *D2StringList) Reset()

func (*D2StringList) String

func (m *D2StringList) String() string

func (*D2StringList) XXX_DiscardUnknown

func (m *D2StringList) XXX_DiscardUnknown()

func (*D2StringList) XXX_Marshal

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

func (*D2StringList) XXX_Merge

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

func (*D2StringList) XXX_Size

func (m *D2StringList) XXX_Size() int

func (*D2StringList) XXX_Unmarshal

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

type D3StringList

type D3StringList struct {
	Data3                []*D2StringList `protobuf:"bytes,1,rep,name=Data3,proto3" json:"Data3,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*D3StringList) Descriptor

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

func (*D3StringList) GetData3

func (m *D3StringList) GetData3() []*D2StringList

func (*D3StringList) ProtoMessage

func (*D3StringList) ProtoMessage()

func (*D3StringList) Reset

func (m *D3StringList) Reset()

func (*D3StringList) String

func (m *D3StringList) String() string

func (*D3StringList) XXX_DiscardUnknown

func (m *D3StringList) XXX_DiscardUnknown()

func (*D3StringList) XXX_Marshal

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

func (*D3StringList) XXX_Merge

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

func (*D3StringList) XXX_Size

func (m *D3StringList) XXX_Size() int

func (*D3StringList) XXX_Unmarshal

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

type Nothing

type Nothing struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Nothing) Descriptor

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

func (*Nothing) ProtoMessage

func (*Nothing) ProtoMessage()

func (*Nothing) Reset

func (m *Nothing) Reset()

func (*Nothing) String

func (m *Nothing) String() string

func (*Nothing) XXX_DiscardUnknown

func (m *Nothing) XXX_DiscardUnknown()

func (*Nothing) XXX_Marshal

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

func (*Nothing) XXX_Merge

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

func (*Nothing) XXX_Size

func (m *Nothing) XXX_Size() int

func (*Nothing) XXX_Unmarshal

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

type SapHistoryServiceClient

type SapHistoryServiceClient interface {
	// Get all Customers with filter - A server-to-client streaming RPC.
	GetSapStatus(ctx context.Context, in *SapSelection, opts ...grpc.CallOption) (*TransactionData, error)
	GetSystemList(ctx context.Context, in *Nothing, opts ...grpc.CallOption) (*SystemList, error)
	UpdateSystem(ctx context.Context, in *SystemInfo, opts ...grpc.CallOption) (*Nothing, error)
	DeleteSystem(ctx context.Context, in *SystemInfo, opts ...grpc.CallOption) (*Nothing, error)
}

SapHistoryServiceClient is the client API for SapHistoryService service.

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

func NewSapHistoryServiceClient

func NewSapHistoryServiceClient(cc *grpc.ClientConn) SapHistoryServiceClient

type SapHistoryServiceServer

type SapHistoryServiceServer interface {
	// Get all Customers with filter - A server-to-client streaming RPC.
	GetSapStatus(context.Context, *SapSelection) (*TransactionData, error)
	GetSystemList(context.Context, *Nothing) (*SystemList, error)
	UpdateSystem(context.Context, *SystemInfo) (*Nothing, error)
	DeleteSystem(context.Context, *SystemInfo) (*Nothing, error)
}

SapHistoryServiceServer is the server API for SapHistoryService service.

type SapSelection

type SapSelection struct {
	Sid                  string   `protobuf:"bytes,2,opt,name=Sid,proto3" json:"Sid,omitempty"`
	Ts                   string   `protobuf:"bytes,3,opt,name=Ts,proto3" json:"Ts,omitempty"`
	Direction            int32    `protobuf:"varint,4,opt,name=Direction,proto3" json:"Direction,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SapSelection) Descriptor

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

func (*SapSelection) GetDirection

func (m *SapSelection) GetDirection() int32

func (*SapSelection) GetSid

func (m *SapSelection) GetSid() string

func (*SapSelection) GetTs

func (m *SapSelection) GetTs() string

func (*SapSelection) ProtoMessage

func (*SapSelection) ProtoMessage()

func (*SapSelection) Reset

func (m *SapSelection) Reset()

func (*SapSelection) String

func (m *SapSelection) String() string

func (*SapSelection) XXX_DiscardUnknown

func (m *SapSelection) XXX_DiscardUnknown()

func (*SapSelection) XXX_Marshal

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

func (*SapSelection) XXX_Merge

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

func (*SapSelection) XXX_Size

func (m *SapSelection) XXX_Size() int

func (*SapSelection) XXX_Unmarshal

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

type Secret

type Secret struct {
	Name                 map[string][]byte `` /* 149-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Secret) Descriptor

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

func (*Secret) GetName

func (m *Secret) GetName() map[string][]byte

func (*Secret) ProtoMessage

func (*Secret) ProtoMessage()

func (*Secret) Reset

func (m *Secret) Reset()

func (*Secret) String

func (m *Secret) String() string

func (*Secret) XXX_DiscardUnknown

func (m *Secret) XXX_DiscardUnknown()

func (*Secret) XXX_Marshal

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

func (*Secret) XXX_Merge

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

func (*Secret) XXX_Size

func (m *Secret) XXX_Size() int

func (*Secret) XXX_Unmarshal

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

type SystemInfo

type SystemInfo struct {
	Sid                  string   `protobuf:"bytes,1,opt,name=Sid,proto3" json:"Sid,omitempty"`
	Client               string   `protobuf:"bytes,2,opt,name=Client,proto3" json:"Client,omitempty"`
	Description          string   `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"`
	Sysnr                string   `protobuf:"bytes,4,opt,name=Sysnr,proto3" json:"Sysnr,omitempty"`
	Hostname             string   `protobuf:"bytes,5,opt,name=Hostname,proto3" json:"Hostname,omitempty"`
	Username             string   `protobuf:"bytes,6,opt,name=Username,proto3" json:"Username,omitempty"`
	Password             string   `protobuf:"bytes,7,opt,name=Password,proto3" json:"Password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SystemInfo) Descriptor

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

func (*SystemInfo) GetClient

func (m *SystemInfo) GetClient() string

func (*SystemInfo) GetDescription

func (m *SystemInfo) GetDescription() string

func (*SystemInfo) GetHostname

func (m *SystemInfo) GetHostname() string

func (*SystemInfo) GetPassword

func (m *SystemInfo) GetPassword() string

func (*SystemInfo) GetSid

func (m *SystemInfo) GetSid() string

func (*SystemInfo) GetSysnr

func (m *SystemInfo) GetSysnr() string

func (*SystemInfo) GetUsername

func (m *SystemInfo) GetUsername() string

func (*SystemInfo) ProtoMessage

func (*SystemInfo) ProtoMessage()

func (*SystemInfo) Reset

func (m *SystemInfo) Reset()

func (*SystemInfo) String

func (m *SystemInfo) String() string

func (*SystemInfo) XXX_DiscardUnknown

func (m *SystemInfo) XXX_DiscardUnknown()

func (*SystemInfo) XXX_Marshal

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

func (*SystemInfo) XXX_Merge

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

func (*SystemInfo) XXX_Size

func (m *SystemInfo) XXX_Size() int

func (*SystemInfo) XXX_Unmarshal

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

type SystemList

type SystemList struct {
	Systems              []*SystemInfo `protobuf:"bytes,1,rep,name=Systems,proto3" json:"Systems,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*SystemList) Descriptor

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

func (*SystemList) GetSystems

func (m *SystemList) GetSystems() []*SystemInfo

func (*SystemList) ProtoMessage

func (*SystemList) ProtoMessage()

func (*SystemList) Reset

func (m *SystemList) Reset()

func (*SystemList) String

func (m *SystemList) String() string

func (*SystemList) XXX_DiscardUnknown

func (m *SystemList) XXX_DiscardUnknown()

func (*SystemList) XXX_Marshal

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

func (*SystemList) XXX_Merge

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

func (*SystemList) XXX_Size

func (m *SystemList) XXX_Size() int

func (*SystemList) XXX_Unmarshal

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

type TransactionData

type TransactionData struct {
	Ts                   string        `protobuf:"bytes,1,opt,name=Ts,proto3" json:"Ts,omitempty"`
	Tcodes               *D1StringList `protobuf:"bytes,4,opt,name=Tcodes,proto3" json:"Tcodes,omitempty"`
	Hdata                *D2StringList `protobuf:"bytes,5,opt,name=Hdata,proto3" json:"Hdata,omitempty"`
	Tdata                *D3StringList `protobuf:"bytes,6,opt,name=Tdata,proto3" json:"Tdata,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*TransactionData) Descriptor

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

func (*TransactionData) GetHdata

func (m *TransactionData) GetHdata() *D2StringList

func (*TransactionData) GetTcodes

func (m *TransactionData) GetTcodes() *D1StringList

func (*TransactionData) GetTdata

func (m *TransactionData) GetTdata() *D3StringList

func (*TransactionData) GetTs

func (m *TransactionData) GetTs() string

func (*TransactionData) ProtoMessage

func (*TransactionData) ProtoMessage()

func (*TransactionData) Reset

func (m *TransactionData) Reset()

func (*TransactionData) String

func (m *TransactionData) String() string

func (*TransactionData) XXX_DiscardUnknown

func (m *TransactionData) XXX_DiscardUnknown()

func (*TransactionData) XXX_Marshal

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

func (*TransactionData) XXX_Merge

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

func (*TransactionData) XXX_Size

func (m *TransactionData) XXX_Size() int

func (*TransactionData) XXX_Unmarshal

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

type UnimplementedSapHistoryServiceServer

type UnimplementedSapHistoryServiceServer struct {
}

UnimplementedSapHistoryServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedSapHistoryServiceServer) DeleteSystem

func (*UnimplementedSapHistoryServiceServer) GetSapStatus

func (*UnimplementedSapHistoryServiceServer) GetSystemList

func (*UnimplementedSapHistoryServiceServer) UpdateSystem

Jump to

Keyboard shortcuts

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