Documentation ¶
Index ¶
- func AccessError(msg string, err error, opts ...authErrorOption) error
- func IsAccessError(err error) bool
- func WithAddress(address string) addressAuthErrorOption
- func WithCredentials(credentials Credentials) credentialsUnauthenticatedErrorOption
- func WithDatabase(database string) databaseAuthErrorOption
- func WithEndpoint(endpoint string) endpointAuthErrorOption
- func WithGrpcDialOptions(opts ...grpc.DialOption) grpcDialOptionsOption
- func WithNodeID(id uint32) authErrorOption
- type AccessToken
- type AccessTokenCredentialsOption
- type Anonymous
- type AnonymousCredentialsOption
- type Credentials
- type SourceInfoOption
- type Static
- type StaticCredentialsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessError ¶ added in v3.54.0
func IsAccessError ¶ added in v3.54.0
func WithAddress ¶ added in v3.53.3
func WithAddress(address string) addressAuthErrorOption
func WithCredentials ¶ added in v3.53.3
func WithCredentials(credentials Credentials) credentialsUnauthenticatedErrorOption
func WithDatabase ¶ added in v3.53.3
func WithDatabase(database string) databaseAuthErrorOption
func WithEndpoint ¶ added in v3.53.3
func WithEndpoint(endpoint string) endpointAuthErrorOption
func WithGrpcDialOptions ¶ added in v3.53.3
func WithGrpcDialOptions(opts ...grpc.DialOption) grpcDialOptionsOption
func WithNodeID ¶ added in v3.53.3
func WithNodeID(id uint32) authErrorOption
Types ¶
type AccessToken ¶ added in v3.48.5
type AccessToken struct {
// contains filtered or unexported fields
}
AccessToken implements Credentials interface with static authorization parameters.
func NewAccessTokenCredentials ¶
func NewAccessTokenCredentials(token string, opts ...AccessTokenCredentialsOption) *AccessToken
func (AccessToken) String ¶ added in v3.48.5
func (c AccessToken) String() string
Token implements Credentials.
type AccessTokenCredentialsOption ¶ added in v3.53.3
type AccessTokenCredentialsOption interface {
ApplyAccessTokenCredentialsOption(c *AccessToken)
}
type Anonymous ¶ added in v3.48.5
type Anonymous struct {
// contains filtered or unexported fields
}
Anonymous implements Credentials interface with Anonymous access
func NewAnonymousCredentials ¶
func NewAnonymousCredentials(opts ...AnonymousCredentialsOption) *Anonymous
type AnonymousCredentialsOption ¶ added in v3.53.3
type AnonymousCredentialsOption interface {
ApplyAnonymousCredentialsOption(c *Anonymous)
}
type Credentials ¶
type Credentials interface { // Token must return actual token or error Token(ctx context.Context) (string, error) }
Credentials is an interface of YDB credentials required for connect with YDB
type SourceInfoOption ¶ added in v3.53.3
type SourceInfoOption string
func WithSourceInfo ¶ added in v3.48.5
func WithSourceInfo(sourceInfo string) SourceInfoOption
WithSourceInfo option append to credentials object the source info for reporting source info details on error case
func (SourceInfoOption) ApplyAccessTokenCredentialsOption ¶ added in v3.53.3
func (sourceInfo SourceInfoOption) ApplyAccessTokenCredentialsOption(h *AccessToken)
func (SourceInfoOption) ApplyAnonymousCredentialsOption ¶ added in v3.53.3
func (sourceInfo SourceInfoOption) ApplyAnonymousCredentialsOption(h *Anonymous)
func (SourceInfoOption) ApplyStaticCredentialsOption ¶ added in v3.53.3
func (sourceInfo SourceInfoOption) ApplyStaticCredentialsOption(h *Static)
type Static ¶ added in v3.48.5
type Static struct {
// contains filtered or unexported fields
}
Static implements Credentials interface with static authorization parameters.
func NewStaticCredentials ¶ added in v3.34.0
func NewStaticCredentials(user, password, endpoint string, opts ...StaticCredentialsOption) *Static
type StaticCredentialsOption ¶ added in v3.53.3
type StaticCredentialsOption interface {
ApplyStaticCredentialsOption(c *Static)
}
Click to show internal directories.
Click to hide internal directories.