mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-05-18 07:41:31 +00:00
iam: implement stub PostgresIamStorage
This commit is contained in:
53
weed/iam/postgres_store.go
Normal file
53
weed/iam/postgres_store.go
Normal file
@@ -0,0 +1,53 @@
|
||||
package iam
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/iam/policy"
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/iam_pb"
|
||||
)
|
||||
|
||||
type PostgresIamStorage struct {
|
||||
// db *sql.DB
|
||||
}
|
||||
|
||||
func NewPostgresIamStorage(config map[string]interface{}) (*PostgresIamStorage, error) {
|
||||
return &PostgresIamStorage{}, nil
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) CreateIdentity(ctx context.Context, identity *iam_pb.Identity) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) GetIdentity(ctx context.Context, name string) (*iam_pb.Identity, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) UpdateIdentity(ctx context.Context, identity *iam_pb.Identity) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) DeleteIdentity(ctx context.Context, name string) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) ListIdentities(ctx context.Context, limit int, offset string) ([]*iam_pb.Identity, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) CreatePolicy(ctx context.Context, name string, policy *policy.PolicyDocument) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) GetPolicy(ctx context.Context, name string) (*policy.PolicyDocument, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) DeletePolicy(ctx context.Context, name string) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *PostgresIamStorage) ListPolicies(ctx context.Context, limit int, offset string) ([]string, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
}
|
||||
Reference in New Issue
Block a user