Documentation ¶
Index ¶
- Variables
- func DeleteFileFromUserHomeDir(pathToFile string)
- func FileExistsInUserHomeDir(pathToFile string) (bool, error)
- func ReadFileFromUserHomeDir(pathToFile string) (string, error)
- func WriteFileToUserHomeDir(content []byte, pathToFile string) error
- type BatchRequest
- type ImmuClient
- type MTLsOptions
- type Options
- func (o *Options) Bind() string
- func (o *Options) String() string
- func (o *Options) WithAddress(address string) *Options
- func (o *Options) WithAuth(authEnabled bool) *Options
- func (o *Options) WithConfig(config string) *Options
- func (o *Options) WithDialOptions(dialOptions *[]grpc.DialOption) *Options
- func (o Options) WithDir(dir string) Options
- func (o *Options) WithHealthCheckRetries(retries int) *Options
- func (o *Options) WithMTLs(MTLs bool) *Options
- func (o *Options) WithMTLsOptions(MTLsOptions MTLsOptions) *Options
- func (o *Options) WithPort(port int) *Options
- func (o *Options) WithTokenFileName(tokenFileName string) *Options
- type RootService
- type TimestampService
- type VerifiedIndex
- type VerifiedItem
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DeleteFileFromUserHomeDir ¶
func DeleteFileFromUserHomeDir(pathToFile string)
func FileExistsInUserHomeDir ¶
func ReadFileFromUserHomeDir ¶
func WriteFileToUserHomeDir ¶
Types ¶
type ImmuClient ¶
type ImmuClient interface { Disconnect() error IsConnected() bool WaitForHealthCheck(ctx context.Context) (err error) Connect(ctx context.Context) (clientConn *grpc.ClientConn, err error) Login(ctx context.Context, user []byte, pass []byte) (*schema.LoginResponse, error) ListUsers(ctx context.Context) (*schema.ItemList, error) CreateUser(ctx context.Context, user []byte, pass []byte) (*schema.CreateUserResponse, error) DeleteUser(ctx context.Context, user []byte) error ChangePassword(ctx context.Context, user []byte, oldPass []byte, newPass []byte) error UpdateAuthConfig(ctx context.Context, kind auth.Kind) error UpdateMTLSConfig(ctx context.Context, enabled bool) error CurrentRoot(ctx context.Context) (*schema.Root, error) Set(ctx context.Context, key []byte, value []byte) (*schema.Index, error) SafeSet(ctx context.Context, key []byte, value []byte) (*VerifiedIndex, error) RawSafeSet(ctx context.Context, key []byte, value []byte) (*VerifiedIndex, error) Get(ctx context.Context, key []byte) (*schema.StructuredItem, error) SafeGet(ctx context.Context, key []byte, opts ...grpc.CallOption) (*VerifiedItem, error) RawSafeGet(ctx context.Context, key []byte, opts ...grpc.CallOption) (*VerifiedItem, error) Scan(ctx context.Context, prefix []byte) (*schema.StructuredItemList, error) ZScan(ctx context.Context, set []byte) (*schema.StructuredItemList, error) ByIndex(ctx context.Context, index uint64) (*schema.StructuredItem, error) ByRawSafeIndex(ctx context.Context, index uint64) (*VerifiedItem, error) IScan(ctx context.Context, pageNumber uint64, pageSize uint64) (*schema.SPage, error) Count(ctx context.Context, prefix []byte) (*schema.ItemsCount, error) SetBatch(ctx context.Context, request *BatchRequest) (*schema.Index, error) GetBatch(ctx context.Context, keys [][]byte) (*schema.StructuredItemList, error) Inclusion(ctx context.Context, index uint64) (*schema.InclusionProof, error) Consistency(ctx context.Context, index uint64) (*schema.ConsistencyProof, error) History(ctx context.Context, key []byte) (*schema.StructuredItemList, error) Reference(ctx context.Context, reference []byte, key []byte) (*schema.Index, error) SafeReference(ctx context.Context, reference []byte, key []byte) (*VerifiedIndex, error) ZAdd(ctx context.Context, set []byte, score float64, key []byte) (*schema.Index, error) SafeZAdd(ctx context.Context, set []byte, score float64, key []byte) (*VerifiedIndex, error) Dump(ctx context.Context, writer io.WriteSeeker) (int64, error) HealthCheck(ctx context.Context) error WithOptions(options *Options) *immuClient WithLogger(logger logger.Logger) *immuClient WithRootService(rs RootService) *immuClient WithTimestampService(ts TimestampService) *immuClient WithClientConn(clientConn *grpc.ClientConn) *immuClient WithServiceClient(serviceClient schema.ImmuServiceClient) *immuClient GetServiceClient() *schema.ImmuServiceClient GetOptions() *Options // contains filtered or unexported methods }
ImmuClient ...
func NewImmuClient ¶
func NewImmuClient(options *Options) (c ImmuClient, err error)
NewImmuClient ...
type MTLsOptions ¶
func DefaultMTLsOptions ¶
func DefaultMTLsOptions() MTLsOptions
func (MTLsOptions) WithCertificate ¶
func (o MTLsOptions) WithCertificate(certificate string) MTLsOptions
func (MTLsOptions) WithClientCAs ¶
func (o MTLsOptions) WithClientCAs(clientCAs string) MTLsOptions
func (MTLsOptions) WithPkey ¶
func (o MTLsOptions) WithPkey(pkey string) MTLsOptions
func (MTLsOptions) WithServername ¶
func (o MTLsOptions) WithServername(servername string) MTLsOptions
type Options ¶
type Options struct { Dir string Address string Port int HealthCheckRetries int MTLs bool MTLsOptions MTLsOptions Auth bool DialOptions *[]grpc.DialOption Config string TokenFileName string }
func DefaultOptions ¶
func DefaultOptions() *Options
func (*Options) WithAddress ¶
WithAddress sets address
func (*Options) WithConfig ¶
WithConfig sets config file name
func (*Options) WithDialOptions ¶
func (o *Options) WithDialOptions(dialOptions *[]grpc.DialOption) *Options
WithDialOptions sets dialOptions
func (*Options) WithHealthCheckRetries ¶
WithHealthCheckRetries sets healt check retries
func (*Options) WithMTLsOptions ¶
func (o *Options) WithMTLsOptions(MTLsOptions MTLsOptions) *Options
WithMTLsOptions sets MTLsOptions
func (*Options) WithTokenFileName ¶
WithTokenFileName sets token file name
type RootService ¶
type RootService interface { GetRoot(ctx context.Context) (*schema.Root, error) SetRoot(root *schema.Root) error }
func NewRootService ¶
func NewRootService(immuC schema.ImmuServiceClient, cache cache.Cache, logger logger.Logger) RootService
type TimestampService ¶
func NewTimestampService ¶
func NewTimestampService(ts timestamp.TsGenerator) TimestampService
type VerifiedIndex ¶
VerifiedIndex ...
func (*VerifiedIndex) String ¶
func (vi *VerifiedIndex) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.