yc

package module
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: Apache-2.0 Imports: 6 Imported by: 13

README

ydb-go-yc

helpers to connect to YDB inside yandex-cloud

godoc

Table of contents

  1. Overview
  2. About semantic versioning
  3. Prerequisites
  4. Installation
  5. Usage

Overview

Currently package provides helpers to connect to YDB inside yandex-cloud.

About semantic versioning

We follow the SemVer 2.0.0. In particular, we provide backward compatibility in the MAJOR releases. New features without loss of backward compatibility appear on the MINOR release. In the minor version, the patch number starts from 0. Bug fixes and internal changes are released with the third digit (PATCH) in the version.

There are, however, some changes with the loss of backward compatibility that we consider to be MINOR:

  • extension or modification of internal ydb-go-yc interfaces. We understand that this will break the compatibility of custom implementations of the ydb-go-yc internal interfaces. But we believe that the internal interfaces of ydb-go-yc are implemented well enough that they do not require custom implementation. We are working to ensure that all internal interfaces have limited access only inside ydb-go-yc.
  • major changes to (including removal of) the public interfaces and types that have been previously exported by ydb-go-yc. We understand that these changes will break the backward compatibility of early adopters of these interfaces. However, these changes are generally coordinated with early adopters and have the concise interfacing with ydb-go-yc as a goal.

Internal interfaces outside from internal directory are marked with comment such as

// Warning: only for internal usage inside ydb-go-yc

We publish the planned breaking MAJOR changes:

  • via the comment Deprecated in the code indicating what should be used instead
  • through the file NEXT_MAJOR_RELEASE.md

Prerequisites

Requires Go 1.13 or later.

Installation

go get -u github.com/ydb-platform/ydb-go-yc

Usage

    db, err := ydb.New(
        ctx,
        connectParams,
        yc.WithInternalCA(),
        //yc.WithMetadataCredentials(ctx), // auth inside cloud (virual machine or yandex function)
        yc.WithServiceAccountKeyFileCredentials("~/.ydb/sa.json"), // auth from service account key file
    )
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithInternalCA

func WithInternalCA() ydb.Option

func WithMetadataCredentials

func WithMetadataCredentials(ctx context.Context) ydb.Option

func WithServiceAccountKeyFileCredentials

func WithServiceAccountKeyFileCredentials(serviceAccountKeyFile string) ydb.Option

Types

This section is empty.

Directories

Path Synopsis
internal
auth
Package iam provides interface for retrieving and caching iam tokens.
Package iam provides interface for retrieving and caching iam tokens.
pem

Jump to

Keyboard shortcuts

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