Documentation ¶
Index ¶
- Variables
- type HTTP
- type RPC
- func (s *RPC) CommitSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
- func (s *RPC) CountObjects(ctx context.Context, req *proto_rpc.GetObjectMsg) (*proto_rpc.ObjectCountResponse, error)
- func (s *RPC) CreateDBSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
- func (s *RPC) CreateIdentity(ctx context.Context, req *proto_rpc.CreateIdentityMsg) (*proto_rpc.GetObjectResponse, error)
- func (s *RPC) CreateMapping(ctx context.Context, req *proto_rpc.CreateMappingMsg) (*proto_rpc.CreateMappingResponse, error)
- func (s *RPC) CreateObjects(ctx context.Context, req *proto_rpc.CreateObjectsMsg) (*proto_rpc.GetObjectsResponse, error)
- func (s *RPC) DeleteDBSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
- func (s *RPC) GetAllMapping(ctx context.Context, req *proto_rpc.GetAllMappingMsg) (*proto_rpc.GetAllMappingResponse, error)
- func (s *RPC) GetDBSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
- func (s *RPC) GetIdentity(ctx context.Context, req *proto_rpc.GetIdentityMsg) (*proto_rpc.GetObjectResponse, error)
- func (s *RPC) GetMapping(ctx context.Context, req *proto_rpc.GetMappingMsg) (*proto_rpc.GetMappingResponse, error)
- func (s *RPC) GetObjects(ctx context.Context, req *proto_rpc.GetObjectMsg) (*proto_rpc.GetObjectsResponse, error)
- func (s *RPC) Interceptors() grpc.UnaryServerInterceptor
- func (s *RPC) RollbackSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
- func (s *RPC) Start(addr string, startedCB func(rpcServer *RPC)) error
- func (s *RPC) Stop() error
Constants ¶
This section is empty.
Variables ¶
var ( // CtxIdentity represents an authenticated identity CtxIdentity types.CtxKey = "identity" // CtxTokenClaims represents claims in an auth token CtxTokenClaims types.CtxKey = "token_claims" // ErrInvalidToken represents a error about an invalid token ErrInvalidToken = fmt.Errorf("permission denied. Invalid token") )
var (
// MaxObjectPerPut is the maximum number of objects allowed in a single PUT operation
MaxObjectPerPut = 25
)
Functions ¶
This section is empty.
Types ¶
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
HTTP defines a structure for an HTTP server that provides REST API services.
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
RPC defines structure for the RPC server
func (*RPC) CommitSession ¶
func (s *RPC) CommitSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
CommitSession commits an active session. Returns no error if the session was successfully committed, or has already been committed or does not exist.
func (*RPC) CountObjects ¶
func (s *RPC) CountObjects(ctx context.Context, req *proto_rpc.GetObjectMsg) (*proto_rpc.ObjectCountResponse, error)
CountObjects counts the number of objects that match a query
func (*RPC) CreateDBSession ¶
func (s *RPC) CreateDBSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
CreateDBSession creates a new session and returns the session ID
func (*RPC) CreateIdentity ¶
func (s *RPC) CreateIdentity(ctx context.Context, req *proto_rpc.CreateIdentityMsg) (*proto_rpc.GetObjectResponse, error)
CreateIdentity creates a new identity for object
func (*RPC) CreateMapping ¶
func (s *RPC) CreateMapping(ctx context.Context, req *proto_rpc.CreateMappingMsg) (*proto_rpc.CreateMappingResponse, error)
CreateMapping creates a mapping for an identity
func (*RPC) CreateObjects ¶
func (s *RPC) CreateObjects(ctx context.Context, req *proto_rpc.CreateObjectsMsg) (*proto_rpc.GetObjectsResponse, error)
CreateObjects creates one or more objects using a session. If session id is provide, it checks whether the session exists locally or forwards the request to the remote session host. Supports the use of mapping to unmap custom fields in the objects to be created.
func (*RPC) DeleteDBSession ¶
func (s *RPC) DeleteDBSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
DeleteDBSession deletes a existing database session
func (*RPC) GetAllMapping ¶
func (s *RPC) GetAllMapping(ctx context.Context, req *proto_rpc.GetAllMappingMsg) (*proto_rpc.GetAllMappingResponse, error)
GetAllMapping fetches the most recent mappings belonging to the logged in developer
func (*RPC) GetDBSession ¶
func (s *RPC) GetDBSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
GetDBSession gets a database session.
func (*RPC) GetIdentity ¶
func (s *RPC) GetIdentity(ctx context.Context, req *proto_rpc.GetIdentityMsg) (*proto_rpc.GetObjectResponse, error)
GetIdentity fetches an identity object
func (*RPC) GetMapping ¶
func (s *RPC) GetMapping(ctx context.Context, req *proto_rpc.GetMappingMsg) (*proto_rpc.GetMappingResponse, error)
GetMapping fetches a mapping belonging to the logged in developer
func (*RPC) GetObjects ¶
func (s *RPC) GetObjects(ctx context.Context, req *proto_rpc.GetObjectMsg) (*proto_rpc.GetObjectsResponse, error)
GetObjects fetches objects belonging to an identity
func (*RPC) Interceptors ¶
func (s *RPC) Interceptors() grpc.UnaryServerInterceptor
Interceptors returns the API interceptors
func (*RPC) RollbackSession ¶
func (s *RPC) RollbackSession(ctx context.Context, req *proto_rpc.DBSession) (*proto_rpc.DBSession, error)
RollbackSession rolls back a session. Returns no error if the session was successfully rolled back, or has already been rolled back or does not exist.