Documentation ¶
Overview ¶
Example ¶
ctx := context.TODO() db, err := ydb.Open(ctx, "grpcs://localhost:2135/local") if err != nil { fmt.Printf("failed to connect: %v", err) return } defer db.Close(ctx) // cleanup resources err = db.Scheme().MakeDirectory(ctx, "/local/test") if err != nil { fmt.Printf("failed to make directory: %v", err) } d, err := db.Scheme().ListDirectory(ctx, "/local/test") if err != nil { fmt.Printf("failed to lsit directory: %v", err) } fmt.Printf("list directory: %+v\n", d)
Output:
Index ¶
- type Client
- type Directory
- type Entry
- func (e *Entry) From(y *Ydb_Scheme.Entry)
- func (e *Entry) IsBlockStoreVolume() bool
- func (e *Entry) IsCoordinationNode() bool
- func (e *Entry) IsDatabase() bool
- func (e *Entry) IsDirectory() bool
- func (e *Entry) IsPersQueueGroup() bool
- func (e *Entry) IsRtmrVolume() bool
- func (e *Entry) IsTable() bool
- type EntryType
- type Permissions
- type PermissionsOption
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { closer.Closer DescribePath(ctx context.Context, path string) (e Entry, err error) MakeDirectory(ctx context.Context, path string) (err error) ListDirectory(ctx context.Context, path string) (d Directory, err error) RemoveDirectory(ctx context.Context, path string) (err error) ModifyPermissions(ctx context.Context, path string, opts ...PermissionsOption) (err error) }
type Entry ¶
type Entry struct { Name string Owner string Type EntryType Permissions []Permissions EffectivePermissions []Permissions }
func InnerConvertEntry ¶
func InnerConvertEntry(y *Ydb_Scheme.Entry) *Entry
func (*Entry) From ¶
func (e *Entry) From(y *Ydb_Scheme.Entry)
func (*Entry) IsBlockStoreVolume ¶
func (*Entry) IsCoordinationNode ¶
func (*Entry) IsDatabase ¶
func (*Entry) IsDirectory ¶
func (*Entry) IsPersQueueGroup ¶
func (*Entry) IsRtmrVolume ¶
type Permissions ¶
func (Permissions) To ¶
func (p Permissions) To(y *Ydb_Scheme.Permissions)
type PermissionsOption ¶
type PermissionsOption func(permissionsDesc)
func WithChangeOwner ¶
func WithChangeOwner(owner string) PermissionsOption
func WithClearPermissions ¶
func WithClearPermissions() PermissionsOption
func WithGrantPermissions ¶
func WithGrantPermissions(p Permissions) PermissionsOption
func WithRevokePermissions ¶
func WithRevokePermissions(p Permissions) PermissionsOption
func WithSetPermissions ¶
func WithSetPermissions(p Permissions) PermissionsOption
Click to show internal directories.
Click to hide internal directories.