package credentials
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/credentials"
Index ¶
- type AccessToken
- func NewAccessTokenCredentials(token string, opts ...Option) *AccessToken
- func (c AccessToken) String() string
- func (c AccessToken) Token(_ context.Context) (string, error)
- type Anonymous
- func NewAnonymousCredentials(opts ...Option) *Anonymous
- func (c Anonymous) String() string
- func (c Anonymous) Token(_ context.Context) (string, error)
- type Credentials
- type Option
- type Static
Types ¶
type AccessToken ¶
type AccessToken struct {
// contains filtered or unexported fields
}
AccessToken implements Credentials interface with static authorization parameters.
func NewAccessTokenCredentials ¶
func NewAccessTokenCredentials(token string, opts ...Option) *AccessToken
func (AccessToken) String ¶
func (c AccessToken) String() string
Token implements Credentials.
func (AccessToken) Token ¶
func (c AccessToken) Token(_ context.Context) (string, error)
Token implements Credentials.
type Anonymous ¶
type Anonymous struct {
// contains filtered or unexported fields
}
Anonymous implements Credentials interface with Anonymous access
func NewAnonymousCredentials ¶
func (Anonymous) String ¶
Token implements Credentials.
func (Anonymous) Token ¶
Token implements Credentials.
type Credentials ¶
type Credentials interface { // Token must return actual token or error Token(context.Context) (string, error) }
Credentials is an interface of YDB credentials required for connect with YDB
type Option ¶
type Option func(opts *optionsHolder)
func WithSourceInfo ¶
type Static ¶
type Static struct {
// contains filtered or unexported fields
}
Static implements Credentials interface with static authorization parameters.
func NewStaticCredentials ¶
func NewStaticCredentials(user, password string, config staticCredentialsConfig, opts ...Option) *Static
func (*Static) String ¶
func (*Static) Token ¶
Source Files ¶
access_token.go anonymous.go credentials.go options.go static.go
- Version
- v3.51.3-rc0
- Published
- Sep 7, 2023
- Platform
- darwin/amd64
- Imports
- 13 packages
- Last checked
- 1 minute ago –
Tools for package owners.