Documentation
¶
Index ¶
- Variables
- func DecodeAccountId(s string) (uint64, error)
- func EncodeAccountId(id uint64) string
- type AccountsCore
- func (c *AccountsCore) Close()
- func (c *AccountsCore) CreateAccount(request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
- func (c *AccountsCore) DeleteAccount(request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
- func (c *AccountsCore) GetAccount(request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
- func (c *AccountsCore) ListAccounts(request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
- func (c *AccountsCore) Restore(reader io.ReadCloser) error
- func (c *AccountsCore) Snapshot() monstera.ApplicationCoreSnapshot
- func (c *AccountsCore) UpdateAccount(request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
- type AccountsCoreAdapter
- type AccountsCoreApi
- type AuthenticationMiddleware
- type ExampleServiceApiServer
- func (s *ExampleServiceApiServer) AcquireLock(ctx context.Context, request *gatewaypb.AcquireLockRequest) (*gatewaypb.AcquireLockResponse, error)
- func (s *ExampleServiceApiServer) Close()
- func (s *ExampleServiceApiServer) CreateNamespace(ctx context.Context, request *gatewaypb.CreateNamespaceRequest) (*gatewaypb.CreateNamespaceResponse, error)
- func (s *ExampleServiceApiServer) DeleteLock(ctx context.Context, request *gatewaypb.DeleteLockRequest) (*gatewaypb.DeleteLockResponse, error)
- func (s *ExampleServiceApiServer) DeleteNamespace(ctx context.Context, request *gatewaypb.DeleteNamespaceRequest) (*gatewaypb.DeleteNamespaceResponse, error)
- func (s *ExampleServiceApiServer) GetLock(ctx context.Context, request *gatewaypb.GetLockRequest) (*gatewaypb.GetLockResponse, error)
- func (s *ExampleServiceApiServer) GetNamespace(ctx context.Context, request *gatewaypb.GetNamespaceRequest) (*gatewaypb.GetNamespaceResponse, error)
- func (s *ExampleServiceApiServer) ListNamespaces(ctx context.Context, request *gatewaypb.ListNamespacesRequest) (*gatewaypb.ListNamespacesResponse, error)
- func (s *ExampleServiceApiServer) ReleaseLock(ctx context.Context, request *gatewaypb.ReleaseLockRequest) (*gatewaypb.ReleaseLockResponse, error)
- func (s *ExampleServiceApiServer) UpdateNamespace(ctx context.Context, request *gatewaypb.UpdateNamespaceRequest) (*gatewaypb.UpdateNamespaceResponse, error)
- type ExampleServiceCoreApi
- type ExampleServiceCoreApiMonsteraStub
- func (s *ExampleServiceCoreApiMonsteraStub) AcquireLock(ctx context.Context, request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) CreateAccount(ctx context.Context, request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) CreateNamespace(ctx context.Context, request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) DeleteAccount(ctx context.Context, request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) DeleteLock(ctx context.Context, request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) DeleteNamespace(ctx context.Context, request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) GetAccount(ctx context.Context, request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) GetLock(ctx context.Context, request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) GetNamespace(ctx context.Context, request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) ListAccounts(ctx context.Context, request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) ListNamespaces(ctx context.Context, request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) ReleaseLock(ctx context.Context, request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) UpdateAccount(ctx context.Context, request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
- func (s *ExampleServiceCoreApiMonsteraStub) UpdateNamespace(ctx context.Context, request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
- type ExampleServiceCoreApiStandaloneStub
- func (s *ExampleServiceCoreApiStandaloneStub) AcquireLock(ctx context.Context, request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) CreateAccount(ctx context.Context, request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) CreateNamespace(ctx context.Context, request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) DeleteAccount(ctx context.Context, request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) DeleteLock(ctx context.Context, request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) DeleteNamespace(ctx context.Context, request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) GetAccount(ctx context.Context, request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) GetLock(ctx context.Context, request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) GetNamespace(ctx context.Context, request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) ListAccounts(ctx context.Context, request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) ListNamespaces(ctx context.Context, request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) ReleaseLock(ctx context.Context, request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) UpdateAccount(ctx context.Context, request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
- func (s *ExampleServiceCoreApiStandaloneStub) UpdateNamespace(ctx context.Context, request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
- type ExampleServiceMonsteraShardKeyCalculator
- type LocksCore
- func (c *LocksCore) AcquireLock(request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
- func (c *LocksCore) Close()
- func (c *LocksCore) DeleteLock(request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
- func (c *LocksCore) GetLock(request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
- func (c *LocksCore) ReleaseLock(request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
- func (c *LocksCore) Restore(reader io.ReadCloser) error
- func (c *LocksCore) Snapshot() monstera.ApplicationCoreSnapshot
- type LocksCoreAdapter
- type LocksCoreApi
- type NamespacesCore
- func (c *NamespacesCore) Close()
- func (c *NamespacesCore) CreateNamespace(request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
- func (c *NamespacesCore) DeleteNamespace(request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
- func (c *NamespacesCore) GetNamespace(request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
- func (c *NamespacesCore) ListNamespaces(request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
- func (c *NamespacesCore) Restore(reader io.ReadCloser) error
- func (c *NamespacesCore) Snapshot() monstera.ApplicationCoreSnapshot
- func (c *NamespacesCore) UpdateNamespace(request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
- type NamespacesCoreAdapter
- func (a *NamespacesCoreAdapter) Close()
- func (a *NamespacesCoreAdapter) Read(request []byte) []byte
- func (a *NamespacesCoreAdapter) Restore(r io.ReadCloser) error
- func (a *NamespacesCoreAdapter) Snapshot() monstera.ApplicationCoreSnapshot
- func (a *NamespacesCoreAdapter) Update(request []byte) []byte
- type NamespacesCoreApi
- type ShardKeyCalculator
- func (g *ShardKeyCalculator) AcquireLockShardKey(request *corepb.AcquireLockRequest) []byte
- func (g *ShardKeyCalculator) CreateAccountShardKey(request *corepb.CreateAccountRequest) []byte
- func (g *ShardKeyCalculator) CreateNamespaceShardKey(request *corepb.CreateNamespaceRequest) []byte
- func (g *ShardKeyCalculator) DeleteAccountShardKey(request *corepb.DeleteAccountRequest) []byte
- func (g *ShardKeyCalculator) DeleteLockShardKey(request *corepb.DeleteLockRequest) []byte
- func (g *ShardKeyCalculator) DeleteNamespaceShardKey(request *corepb.DeleteNamespaceRequest) []byte
- func (g *ShardKeyCalculator) GetAccountShardKey(request *corepb.GetAccountRequest) []byte
- func (g *ShardKeyCalculator) GetLockShardKey(request *corepb.GetLockRequest) []byte
- func (g *ShardKeyCalculator) GetNamespaceShardKey(request *corepb.GetNamespaceRequest) []byte
- func (g *ShardKeyCalculator) ListAccountsShardKey(request *corepb.ListAccountsRequest) []byte
- func (g *ShardKeyCalculator) ListNamespacesShardKey(request *corepb.ListNamespacesRequest) []byte
- func (g *ShardKeyCalculator) ReleaseLockShardKey(request *corepb.ReleaseLockRequest) []byte
- func (g *ShardKeyCalculator) UpdateAccountShardKey(request *corepb.UpdateAccountRequest) []byte
- func (g *ShardKeyCalculator) UpdateNamespaceShardKey(request *corepb.UpdateNamespaceRequest) []byte
- type UnimplementedExampleServiceCoreApi
- func (a *UnimplementedExampleServiceCoreApi) AcquireLock(ctx context.Context, request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) CreateAccount(ctx context.Context, request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) CreateNamespace(ctx context.Context, request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) DeleteAccount(ctx context.Context, request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) DeleteLock(ctx context.Context, request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) DeleteNamespace(ctx context.Context, request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) GetAccount(ctx context.Context, request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) GetLock(ctx context.Context, request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) GetNamespace(ctx context.Context, request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) ListAccounts(ctx context.Context, request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) ListNamespaces(ctx context.Context, request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) ReleaseLock(ctx context.Context, request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) UpdateAccount(ctx context.Context, request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
- func (a *UnimplementedExampleServiceCoreApi) UpdateNamespace(ctx context.Context, request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidId = errors.New("invalid id")
)
Functions ¶
func DecodeAccountId ¶
func EncodeAccountId ¶
Types ¶
type AccountsCore ¶
type AccountsCore struct {
// contains filtered or unexported fields
}
func NewAccountsCore ¶
func NewAccountsCore(badgerStore *monstera.BadgerStore) *AccountsCore
func (*AccountsCore) Close ¶
func (c *AccountsCore) Close()
func (*AccountsCore) CreateAccount ¶
func (c *AccountsCore) CreateAccount(request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
func (*AccountsCore) DeleteAccount ¶
func (c *AccountsCore) DeleteAccount(request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
func (*AccountsCore) GetAccount ¶
func (c *AccountsCore) GetAccount(request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
func (*AccountsCore) ListAccounts ¶
func (c *AccountsCore) ListAccounts(request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
func (*AccountsCore) Restore ¶
func (c *AccountsCore) Restore(reader io.ReadCloser) error
func (*AccountsCore) Snapshot ¶
func (c *AccountsCore) Snapshot() monstera.ApplicationCoreSnapshot
func (*AccountsCore) UpdateAccount ¶
func (c *AccountsCore) UpdateAccount(request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
type AccountsCoreAdapter ¶
type AccountsCoreAdapter struct {
// contains filtered or unexported fields
}
func NewAccountsCoreAdapter ¶
func NewAccountsCoreAdapter(accountsCore AccountsCoreApi) *AccountsCoreAdapter
func (*AccountsCoreAdapter) Close ¶
func (a *AccountsCoreAdapter) Close()
func (*AccountsCoreAdapter) Read ¶
func (a *AccountsCoreAdapter) Read(request []byte) []byte
func (*AccountsCoreAdapter) Restore ¶
func (a *AccountsCoreAdapter) Restore(r io.ReadCloser) error
func (*AccountsCoreAdapter) Snapshot ¶
func (a *AccountsCoreAdapter) Snapshot() monstera.ApplicationCoreSnapshot
func (*AccountsCoreAdapter) Update ¶
func (a *AccountsCoreAdapter) Update(request []byte) []byte
type AccountsCoreApi ¶
type AccountsCoreApi interface {
Snapshot() monstera.ApplicationCoreSnapshot
Restore(reader io.ReadCloser) error
Close()
ListAccounts(request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
GetAccount(request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
CreateAccount(request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
UpdateAccount(request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
DeleteAccount(request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
}
type AuthenticationMiddleware ¶
type AuthenticationMiddleware struct {
}
func (*AuthenticationMiddleware) Unary ¶
func (m *AuthenticationMiddleware) Unary( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error)
type ExampleServiceApiServer ¶
type ExampleServiceApiServer struct {
gatewaypb.UnimplementedExampleServiceApiServer
// contains filtered or unexported fields
}
func NewExampleServiceApiServer ¶
func NewExampleServiceApiServer(coreApiClient ExampleServiceCoreApi) *ExampleServiceApiServer
func (*ExampleServiceApiServer) AcquireLock ¶
func (s *ExampleServiceApiServer) AcquireLock(ctx context.Context, request *gatewaypb.AcquireLockRequest) (*gatewaypb.AcquireLockResponse, error)
func (*ExampleServiceApiServer) Close ¶
func (s *ExampleServiceApiServer) Close()
func (*ExampleServiceApiServer) CreateNamespace ¶
func (s *ExampleServiceApiServer) CreateNamespace(ctx context.Context, request *gatewaypb.CreateNamespaceRequest) (*gatewaypb.CreateNamespaceResponse, error)
func (*ExampleServiceApiServer) DeleteLock ¶
func (s *ExampleServiceApiServer) DeleteLock(ctx context.Context, request *gatewaypb.DeleteLockRequest) (*gatewaypb.DeleteLockResponse, error)
func (*ExampleServiceApiServer) DeleteNamespace ¶
func (s *ExampleServiceApiServer) DeleteNamespace(ctx context.Context, request *gatewaypb.DeleteNamespaceRequest) (*gatewaypb.DeleteNamespaceResponse, error)
func (*ExampleServiceApiServer) GetLock ¶
func (s *ExampleServiceApiServer) GetLock(ctx context.Context, request *gatewaypb.GetLockRequest) (*gatewaypb.GetLockResponse, error)
func (*ExampleServiceApiServer) GetNamespace ¶
func (s *ExampleServiceApiServer) GetNamespace(ctx context.Context, request *gatewaypb.GetNamespaceRequest) (*gatewaypb.GetNamespaceResponse, error)
func (*ExampleServiceApiServer) ListNamespaces ¶
func (s *ExampleServiceApiServer) ListNamespaces(ctx context.Context, request *gatewaypb.ListNamespacesRequest) (*gatewaypb.ListNamespacesResponse, error)
func (*ExampleServiceApiServer) ReleaseLock ¶
func (s *ExampleServiceApiServer) ReleaseLock(ctx context.Context, request *gatewaypb.ReleaseLockRequest) (*gatewaypb.ReleaseLockResponse, error)
func (*ExampleServiceApiServer) UpdateNamespace ¶
func (s *ExampleServiceApiServer) UpdateNamespace(ctx context.Context, request *gatewaypb.UpdateNamespaceRequest) (*gatewaypb.UpdateNamespaceResponse, error)
type ExampleServiceCoreApi ¶
type ExampleServiceCoreApi interface {
ListAccounts(ctx context.Context, request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
GetAccount(ctx context.Context, request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
CreateAccount(ctx context.Context, request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
UpdateAccount(ctx context.Context, request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
DeleteAccount(ctx context.Context, request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
GetNamespace(ctx context.Context, request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
ListNamespaces(ctx context.Context, request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
CreateNamespace(ctx context.Context, request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
UpdateNamespace(ctx context.Context, request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
DeleteNamespace(ctx context.Context, request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
AcquireLock(ctx context.Context, request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
ReleaseLock(ctx context.Context, request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
DeleteLock(ctx context.Context, request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
GetLock(ctx context.Context, request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
}
type ExampleServiceCoreApiMonsteraStub ¶
type ExampleServiceCoreApiMonsteraStub struct {
// contains filtered or unexported fields
}
func NewExampleServiceCoreApiMonsteraStub ¶
func NewExampleServiceCoreApiMonsteraStub(monsteraClient *monstera.MonsteraClient, shardKeyCalculator ExampleServiceMonsteraShardKeyCalculator) *ExampleServiceCoreApiMonsteraStub
func (*ExampleServiceCoreApiMonsteraStub) AcquireLock ¶
func (s *ExampleServiceCoreApiMonsteraStub) AcquireLock(ctx context.Context, request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) CreateAccount ¶
func (s *ExampleServiceCoreApiMonsteraStub) CreateAccount(ctx context.Context, request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) CreateNamespace ¶
func (s *ExampleServiceCoreApiMonsteraStub) CreateNamespace(ctx context.Context, request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) DeleteAccount ¶
func (s *ExampleServiceCoreApiMonsteraStub) DeleteAccount(ctx context.Context, request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) DeleteLock ¶
func (s *ExampleServiceCoreApiMonsteraStub) DeleteLock(ctx context.Context, request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) DeleteNamespace ¶
func (s *ExampleServiceCoreApiMonsteraStub) DeleteNamespace(ctx context.Context, request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) GetAccount ¶
func (s *ExampleServiceCoreApiMonsteraStub) GetAccount(ctx context.Context, request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) GetLock ¶
func (s *ExampleServiceCoreApiMonsteraStub) GetLock(ctx context.Context, request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) GetNamespace ¶
func (s *ExampleServiceCoreApiMonsteraStub) GetNamespace(ctx context.Context, request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) ListAccounts ¶
func (s *ExampleServiceCoreApiMonsteraStub) ListAccounts(ctx context.Context, request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) ListNamespaces ¶
func (s *ExampleServiceCoreApiMonsteraStub) ListNamespaces(ctx context.Context, request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) ReleaseLock ¶
func (s *ExampleServiceCoreApiMonsteraStub) ReleaseLock(ctx context.Context, request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) UpdateAccount ¶
func (s *ExampleServiceCoreApiMonsteraStub) UpdateAccount(ctx context.Context, request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
func (*ExampleServiceCoreApiMonsteraStub) UpdateNamespace ¶
func (s *ExampleServiceCoreApiMonsteraStub) UpdateNamespace(ctx context.Context, request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
type ExampleServiceCoreApiStandaloneStub ¶
type ExampleServiceCoreApiStandaloneStub struct {
// contains filtered or unexported fields
}
func NewExampleServiceCoreApiStandaloneStub ¶
func NewExampleServiceCoreApiStandaloneStub(accountsCore AccountsCoreApi, namespacesCore NamespacesCoreApi, locksCore LocksCoreApi) *ExampleServiceCoreApiStandaloneStub
func (*ExampleServiceCoreApiStandaloneStub) AcquireLock ¶
func (s *ExampleServiceCoreApiStandaloneStub) AcquireLock(ctx context.Context, request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) CreateAccount ¶
func (s *ExampleServiceCoreApiStandaloneStub) CreateAccount(ctx context.Context, request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) CreateNamespace ¶
func (s *ExampleServiceCoreApiStandaloneStub) CreateNamespace(ctx context.Context, request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) DeleteAccount ¶
func (s *ExampleServiceCoreApiStandaloneStub) DeleteAccount(ctx context.Context, request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) DeleteLock ¶
func (s *ExampleServiceCoreApiStandaloneStub) DeleteLock(ctx context.Context, request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) DeleteNamespace ¶
func (s *ExampleServiceCoreApiStandaloneStub) DeleteNamespace(ctx context.Context, request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) GetAccount ¶
func (s *ExampleServiceCoreApiStandaloneStub) GetAccount(ctx context.Context, request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) GetLock ¶
func (s *ExampleServiceCoreApiStandaloneStub) GetLock(ctx context.Context, request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) GetNamespace ¶
func (s *ExampleServiceCoreApiStandaloneStub) GetNamespace(ctx context.Context, request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) ListAccounts ¶
func (s *ExampleServiceCoreApiStandaloneStub) ListAccounts(ctx context.Context, request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) ListNamespaces ¶
func (s *ExampleServiceCoreApiStandaloneStub) ListNamespaces(ctx context.Context, request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) ReleaseLock ¶
func (s *ExampleServiceCoreApiStandaloneStub) ReleaseLock(ctx context.Context, request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) UpdateAccount ¶
func (s *ExampleServiceCoreApiStandaloneStub) UpdateAccount(ctx context.Context, request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
func (*ExampleServiceCoreApiStandaloneStub) UpdateNamespace ¶
func (s *ExampleServiceCoreApiStandaloneStub) UpdateNamespace(ctx context.Context, request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
type ExampleServiceMonsteraShardKeyCalculator ¶
type ExampleServiceMonsteraShardKeyCalculator interface {
ListAccountsShardKey(request *corepb.ListAccountsRequest) []byte
GetAccountShardKey(request *corepb.GetAccountRequest) []byte
CreateAccountShardKey(request *corepb.CreateAccountRequest) []byte
UpdateAccountShardKey(request *corepb.UpdateAccountRequest) []byte
DeleteAccountShardKey(request *corepb.DeleteAccountRequest) []byte
GetNamespaceShardKey(request *corepb.GetNamespaceRequest) []byte
ListNamespacesShardKey(request *corepb.ListNamespacesRequest) []byte
CreateNamespaceShardKey(request *corepb.CreateNamespaceRequest) []byte
UpdateNamespaceShardKey(request *corepb.UpdateNamespaceRequest) []byte
DeleteNamespaceShardKey(request *corepb.DeleteNamespaceRequest) []byte
AcquireLockShardKey(request *corepb.AcquireLockRequest) []byte
ReleaseLockShardKey(request *corepb.ReleaseLockRequest) []byte
DeleteLockShardKey(request *corepb.DeleteLockRequest) []byte
GetLockShardKey(request *corepb.GetLockRequest) []byte
}
type LocksCore ¶
type LocksCore struct {
// contains filtered or unexported fields
}
func NewLocksCore ¶
func NewLocksCore(badgerStore *monstera.BadgerStore, shardLowerBound []byte, shardUpperBound []byte) *LocksCore
func (*LocksCore) AcquireLock ¶
func (c *LocksCore) AcquireLock(request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
func (*LocksCore) DeleteLock ¶
func (c *LocksCore) DeleteLock(request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
func (*LocksCore) GetLock ¶
func (c *LocksCore) GetLock(request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
func (*LocksCore) ReleaseLock ¶
func (c *LocksCore) ReleaseLock(request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
func (*LocksCore) Snapshot ¶
func (c *LocksCore) Snapshot() monstera.ApplicationCoreSnapshot
type LocksCoreAdapter ¶
type LocksCoreAdapter struct {
// contains filtered or unexported fields
}
func NewLocksCoreAdapter ¶
func NewLocksCoreAdapter(locksCore LocksCoreApi) *LocksCoreAdapter
func (*LocksCoreAdapter) Close ¶
func (a *LocksCoreAdapter) Close()
func (*LocksCoreAdapter) Read ¶
func (a *LocksCoreAdapter) Read(request []byte) []byte
func (*LocksCoreAdapter) Restore ¶
func (a *LocksCoreAdapter) Restore(r io.ReadCloser) error
func (*LocksCoreAdapter) Snapshot ¶
func (a *LocksCoreAdapter) Snapshot() monstera.ApplicationCoreSnapshot
func (*LocksCoreAdapter) Update ¶
func (a *LocksCoreAdapter) Update(request []byte) []byte
type LocksCoreApi ¶
type LocksCoreApi interface {
Snapshot() monstera.ApplicationCoreSnapshot
Restore(reader io.ReadCloser) error
Close()
AcquireLock(request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
ReleaseLock(request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
DeleteLock(request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
GetLock(request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
}
type NamespacesCore ¶
type NamespacesCore struct {
// contains filtered or unexported fields
}
func NewNamespacesCore ¶
func NewNamespacesCore(badgerStore *monstera.BadgerStore, shardLowerBound []byte, shardUpperBound []byte) *NamespacesCore
func (*NamespacesCore) Close ¶
func (c *NamespacesCore) Close()
func (*NamespacesCore) CreateNamespace ¶
func (c *NamespacesCore) CreateNamespace(request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
func (*NamespacesCore) DeleteNamespace ¶
func (c *NamespacesCore) DeleteNamespace(request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
func (*NamespacesCore) GetNamespace ¶
func (c *NamespacesCore) GetNamespace(request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
func (*NamespacesCore) ListNamespaces ¶
func (c *NamespacesCore) ListNamespaces(request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
func (*NamespacesCore) Restore ¶
func (c *NamespacesCore) Restore(reader io.ReadCloser) error
func (*NamespacesCore) Snapshot ¶
func (c *NamespacesCore) Snapshot() monstera.ApplicationCoreSnapshot
func (*NamespacesCore) UpdateNamespace ¶
func (c *NamespacesCore) UpdateNamespace(request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
type NamespacesCoreAdapter ¶
type NamespacesCoreAdapter struct {
// contains filtered or unexported fields
}
func NewNamespacesCoreAdapter ¶
func NewNamespacesCoreAdapter(namespacesCore NamespacesCoreApi) *NamespacesCoreAdapter
func (*NamespacesCoreAdapter) Close ¶
func (a *NamespacesCoreAdapter) Close()
func (*NamespacesCoreAdapter) Read ¶
func (a *NamespacesCoreAdapter) Read(request []byte) []byte
func (*NamespacesCoreAdapter) Restore ¶
func (a *NamespacesCoreAdapter) Restore(r io.ReadCloser) error
func (*NamespacesCoreAdapter) Snapshot ¶
func (a *NamespacesCoreAdapter) Snapshot() monstera.ApplicationCoreSnapshot
func (*NamespacesCoreAdapter) Update ¶
func (a *NamespacesCoreAdapter) Update(request []byte) []byte
type NamespacesCoreApi ¶
type NamespacesCoreApi interface {
Snapshot() monstera.ApplicationCoreSnapshot
Restore(reader io.ReadCloser) error
Close()
GetNamespace(request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
ListNamespaces(request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
CreateNamespace(request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
UpdateNamespace(request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
DeleteNamespace(request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
}
type ShardKeyCalculator ¶
type ShardKeyCalculator struct{}
func (*ShardKeyCalculator) AcquireLockShardKey ¶
func (g *ShardKeyCalculator) AcquireLockShardKey(request *corepb.AcquireLockRequest) []byte
func (*ShardKeyCalculator) CreateAccountShardKey ¶
func (g *ShardKeyCalculator) CreateAccountShardKey(request *corepb.CreateAccountRequest) []byte
func (*ShardKeyCalculator) CreateNamespaceShardKey ¶
func (g *ShardKeyCalculator) CreateNamespaceShardKey(request *corepb.CreateNamespaceRequest) []byte
func (*ShardKeyCalculator) DeleteAccountShardKey ¶
func (g *ShardKeyCalculator) DeleteAccountShardKey(request *corepb.DeleteAccountRequest) []byte
func (*ShardKeyCalculator) DeleteLockShardKey ¶
func (g *ShardKeyCalculator) DeleteLockShardKey(request *corepb.DeleteLockRequest) []byte
func (*ShardKeyCalculator) DeleteNamespaceShardKey ¶
func (g *ShardKeyCalculator) DeleteNamespaceShardKey(request *corepb.DeleteNamespaceRequest) []byte
func (*ShardKeyCalculator) GetAccountShardKey ¶
func (g *ShardKeyCalculator) GetAccountShardKey(request *corepb.GetAccountRequest) []byte
func (*ShardKeyCalculator) GetLockShardKey ¶
func (g *ShardKeyCalculator) GetLockShardKey(request *corepb.GetLockRequest) []byte
func (*ShardKeyCalculator) GetNamespaceShardKey ¶
func (g *ShardKeyCalculator) GetNamespaceShardKey(request *corepb.GetNamespaceRequest) []byte
func (*ShardKeyCalculator) ListAccountsShardKey ¶
func (g *ShardKeyCalculator) ListAccountsShardKey(request *corepb.ListAccountsRequest) []byte
func (*ShardKeyCalculator) ListNamespacesShardKey ¶
func (g *ShardKeyCalculator) ListNamespacesShardKey(request *corepb.ListNamespacesRequest) []byte
func (*ShardKeyCalculator) ReleaseLockShardKey ¶
func (g *ShardKeyCalculator) ReleaseLockShardKey(request *corepb.ReleaseLockRequest) []byte
func (*ShardKeyCalculator) UpdateAccountShardKey ¶
func (g *ShardKeyCalculator) UpdateAccountShardKey(request *corepb.UpdateAccountRequest) []byte
func (*ShardKeyCalculator) UpdateNamespaceShardKey ¶
func (g *ShardKeyCalculator) UpdateNamespaceShardKey(request *corepb.UpdateNamespaceRequest) []byte
type UnimplementedExampleServiceCoreApi ¶
type UnimplementedExampleServiceCoreApi struct{}
func (*UnimplementedExampleServiceCoreApi) AcquireLock ¶
func (a *UnimplementedExampleServiceCoreApi) AcquireLock(ctx context.Context, request *corepb.AcquireLockRequest) (*corepb.AcquireLockResponse, error)
func (*UnimplementedExampleServiceCoreApi) CreateAccount ¶
func (a *UnimplementedExampleServiceCoreApi) CreateAccount(ctx context.Context, request *corepb.CreateAccountRequest) (*corepb.CreateAccountResponse, error)
func (*UnimplementedExampleServiceCoreApi) CreateNamespace ¶
func (a *UnimplementedExampleServiceCoreApi) CreateNamespace(ctx context.Context, request *corepb.CreateNamespaceRequest) (*corepb.CreateNamespaceResponse, error)
func (*UnimplementedExampleServiceCoreApi) DeleteAccount ¶
func (a *UnimplementedExampleServiceCoreApi) DeleteAccount(ctx context.Context, request *corepb.DeleteAccountRequest) (*corepb.DeleteAccountResponse, error)
func (*UnimplementedExampleServiceCoreApi) DeleteLock ¶
func (a *UnimplementedExampleServiceCoreApi) DeleteLock(ctx context.Context, request *corepb.DeleteLockRequest) (*corepb.DeleteLockResponse, error)
func (*UnimplementedExampleServiceCoreApi) DeleteNamespace ¶
func (a *UnimplementedExampleServiceCoreApi) DeleteNamespace(ctx context.Context, request *corepb.DeleteNamespaceRequest) (*corepb.DeleteNamespaceResponse, error)
func (*UnimplementedExampleServiceCoreApi) GetAccount ¶
func (a *UnimplementedExampleServiceCoreApi) GetAccount(ctx context.Context, request *corepb.GetAccountRequest) (*corepb.GetAccountResponse, error)
func (*UnimplementedExampleServiceCoreApi) GetLock ¶
func (a *UnimplementedExampleServiceCoreApi) GetLock(ctx context.Context, request *corepb.GetLockRequest) (*corepb.GetLockResponse, error)
func (*UnimplementedExampleServiceCoreApi) GetNamespace ¶
func (a *UnimplementedExampleServiceCoreApi) GetNamespace(ctx context.Context, request *corepb.GetNamespaceRequest) (*corepb.GetNamespaceResponse, error)
func (*UnimplementedExampleServiceCoreApi) ListAccounts ¶
func (a *UnimplementedExampleServiceCoreApi) ListAccounts(ctx context.Context, request *corepb.ListAccountsRequest) (*corepb.ListAccountsResponse, error)
func (*UnimplementedExampleServiceCoreApi) ListNamespaces ¶
func (a *UnimplementedExampleServiceCoreApi) ListNamespaces(ctx context.Context, request *corepb.ListNamespacesRequest) (*corepb.ListNamespacesResponse, error)
func (*UnimplementedExampleServiceCoreApi) ReleaseLock ¶
func (a *UnimplementedExampleServiceCoreApi) ReleaseLock(ctx context.Context, request *corepb.ReleaseLockRequest) (*corepb.ReleaseLockResponse, error)
func (*UnimplementedExampleServiceCoreApi) UpdateAccount ¶
func (a *UnimplementedExampleServiceCoreApi) UpdateAccount(ctx context.Context, request *corepb.UpdateAccountRequest) (*corepb.UpdateAccountResponse, error)
func (*UnimplementedExampleServiceCoreApi) UpdateNamespace ¶
func (a *UnimplementedExampleServiceCoreApi) UpdateNamespace(ctx context.Context, request *corepb.UpdateNamespaceRequest) (*corepb.UpdateNamespaceResponse, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.