Documentation ¶
Overview ¶
Copyright 2022 CodeNotary, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 CodeNotary, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 CodeNotary, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 CodeNotary, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 CodeNotary, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func Init(opts *Options) (*immuc, error)
- func PadRight(str, pad string, length int) string
- func PrintHealth(res *schema.DatabaseHealthResponse) string
- func PrintKV(entry *schema.Entry, verified, valueOnly bool) string
- func PrintSetItem(set []byte, referencedkey []byte, score float64, txhdr *schema.TxHeader, ...) string
- func PrintState(root *schema.ImmutableState) string
- func PrintTx(tx *schema.Tx, verified bool) string
- type Client
- type Options
- func (o *Options) GetImmudbClientOptions() *client.Options
- func (o *Options) GetRevisionSeparator() string
- func (o *Options) GetValueOnly() bool
- func (o *Options) WithImmudbClientOptions(opts *client.Options) *Options
- func (o *Options) WithRevisionSeparator(revisionSeparator string) *Options
- func (o *Options) WithValueOnly(valueOnly bool) *Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintHealth ¶ added in v1.2.3
func PrintHealth(res *schema.DatabaseHealthResponse) string
func PrintSetItem ¶
func PrintSetItem(set []byte, referencedkey []byte, score float64, txhdr *schema.TxHeader, verified bool) string
PrintSetItem ...
func PrintState ¶ added in v0.9.0
func PrintState(root *schema.ImmutableState) string
PrintState ...
Types ¶
type Client ¶
type Client interface { Connect(args []string) error Disconnect(args []string) error Execute(f func(immuClient client.ImmuClient) (interface{}, error)) (interface{}, error) HealthCheck(args []string) (string, error) DatabaseHealth(args []string) (string, error) CurrentState(args []string) (string, error) GetTxByID(args []string) (string, error) VerifiedGetTxByID(args []string) (string, error) Get(args []string) (string, error) VerifiedGet(args []string) (string, error) Login(args []string) (string, error) Logout(args []string) (string, error) History(args []string) (string, error) SetReference(args []string) (string, error) VerifiedSetReference(args []string) (string, error) ZScan(args []string) (string, error) Scan(args []string) (string, error) Count(args []string) (string, error) Set(args []string) (string, error) Restore(args []string) (string, error) VerifiedSet(args []string) (string, error) DeleteKey(args []string) (string, error) ZAdd(args []string) (string, error) VerifiedZAdd(args []string) (string, error) CreateDatabase(args []string) (string, error) DatabaseList(args []string) (string, error) UseDatabase(args []string) (string, error) UserCreate(args []string) (string, error) SetActiveUser(args []string, active bool) (string, error) SetUserPermission(args []string) (string, error) UserList(args []string) (string, error) ChangeUserPassword(args []string) (string, error) ValueOnly() bool // TODO: ? SetValueOnly(v bool) // TODO: ? SQLExec(args []string) (string, error) SQLQuery(args []string) (string, error) ListTables() (string, error) DescribeTable(args []string) (string, error) WithFileTokenService(tkns tokenservice.TokenService) Client }
Client ...
type Options ¶ added in v0.7.0
type Options struct {
// contains filtered or unexported fields
}
func OptionsFromEnv ¶ added in v1.3.0
func OptionsFromEnv() *Options