Documentation
¶
Index ¶
- Constants
- Variables
- func LookupSqlSchemaSetRootOp(_ context.Context, opTypeID string) (world.Operation, error)
- func SqlSchemaFactory(ctx context.Context, _ *logrus.Entry, _ bus.Bus, _ world.Engine, ...) (srpc.Invoker, func(), error)
- type SqlSchemaResource
- func (r *SqlSchemaResource) Close()
- func (r *SqlSchemaResource) GetMux() srpc.Mux
- func (r *SqlSchemaResource) GetSchema(ctx context.Context, _ *s4wave_sql_schema.GetSchemaRequest) (*s4wave_sql_schema.GetSchemaResponse, error)
- func (r *SqlSchemaResource) ListTables(ctx context.Context, _ *s4wave_sql_schema.ListTablesRequest) (*s4wave_sql_schema.ListTablesResponse, error)
- type SqlSchemaSetRootOp
- func (o *SqlSchemaSetRootOp) ApplyWorldObjectOp(ctx context.Context, _ *logrus.Entry, os world.ObjectState, _ peer.ID) (bool, error)
- func (o *SqlSchemaSetRootOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, ws world.WorldState, sender peer.ID) (bool, error)
- func (m *SqlSchemaSetRootOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *SqlSchemaSetRootOp) CloneVT() *SqlSchemaSetRootOp
- func (this *SqlSchemaSetRootOp) EqualMessageVT(thatMsg any) bool
- func (this *SqlSchemaSetRootOp) EqualVT(that *SqlSchemaSetRootOp) bool
- func (x *SqlSchemaSetRootOp) GetObjectKey() string
- func (o *SqlSchemaSetRootOp) GetOperationTypeId() string
- func (x *SqlSchemaSetRootOp) GetRootRef() *bucket.ObjectRef
- func (o *SqlSchemaSetRootOp) MarshalBlock() ([]byte, error)
- func (x *SqlSchemaSetRootOp) MarshalJSON() ([]byte, error)
- func (x *SqlSchemaSetRootOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *SqlSchemaSetRootOp) MarshalProtoText() string
- func (m *SqlSchemaSetRootOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SqlSchemaSetRootOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *SqlSchemaSetRootOp) MarshalVT() (dAtA []byte, err error)
- func (*SqlSchemaSetRootOp) ProtoMessage()
- func (x *SqlSchemaSetRootOp) Reset()
- func (m *SqlSchemaSetRootOp) SizeVT() (n int)
- func (x *SqlSchemaSetRootOp) String() string
- func (o *SqlSchemaSetRootOp) UnmarshalBlock(data []byte) error
- func (x *SqlSchemaSetRootOp) UnmarshalJSON(b []byte) error
- func (x *SqlSchemaSetRootOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *SqlSchemaSetRootOp) UnmarshalVT(dAtA []byte) error
- func (o *SqlSchemaSetRootOp) Validate() error
Constants ¶
const SqlSchemaSetRootOpId = "sql/schema/set-root"
SqlSchemaSetRootOpId is the world op id for advancing a sql/schema root.
Variables ¶
var SqlSchemaType = objecttype.NewObjectType(s4wave_sql_schema.SqlSchemaTypeID, SqlSchemaFactory)
SqlSchemaType registers the SQL schema world ObjectType.
Functions ¶
func LookupSqlSchemaSetRootOp ¶
LookupSqlSchemaSetRootOp returns an empty SQL schema set-root op for lookup.
Types ¶
type SqlSchemaResource ¶
type SqlSchemaResource struct {
// contains filtered or unexported fields
}
SqlSchemaResource serves SqlSchemaResourceService for one SQL schema object.
func NewSqlSchemaResource ¶
func NewSqlSchemaResource( ws world.WorldState, objectKey string, ) *SqlSchemaResource
NewSqlSchemaResource constructs a SQL schema resource.
func (*SqlSchemaResource) Close ¶
func (r *SqlSchemaResource) Close()
Close releases the resource lifecycle.
func (*SqlSchemaResource) GetMux ¶
func (r *SqlSchemaResource) GetMux() srpc.Mux
GetMux returns the SRPC mux for this resource.
func (*SqlSchemaResource) GetSchema ¶
func (r *SqlSchemaResource) GetSchema( ctx context.Context, _ *s4wave_sql_schema.GetSchemaRequest, ) (*s4wave_sql_schema.GetSchemaResponse, error)
GetSchema returns the schema metadata.
func (*SqlSchemaResource) ListTables ¶
func (r *SqlSchemaResource) ListTables( ctx context.Context, _ *s4wave_sql_schema.ListTablesRequest, ) (*s4wave_sql_schema.ListTablesResponse, error)
ListTables lists tables in the target sql/db schema.
type SqlSchemaSetRootOp ¶
type SqlSchemaSetRootOp struct {
// ObjectKey is the sql/schema object key to update.
ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
// RootRef is the committed schema root reference.
RootRef *bucket.ObjectRef `protobuf:"bytes,2,opt,name=root_ref,json=rootRef,proto3" json:"rootRef,omitempty"`
// contains filtered or unexported fields
}
SqlSchemaSetRootOp advances a sql/schema world object's root.
func NewSqlSchemaSetRootOp ¶
func NewSqlSchemaSetRootOp(objectKey string, rootRef *bucket.ObjectRef) *SqlSchemaSetRootOp
NewSqlSchemaSetRootOp constructs a SQL schema set-root operation.
func (*SqlSchemaSetRootOp) ApplyWorldObjectOp ¶
func (o *SqlSchemaSetRootOp) ApplyWorldObjectOp( ctx context.Context, _ *logrus.Entry, os world.ObjectState, _ peer.ID, ) (bool, error)
ApplyWorldObjectOp applies the SQL schema set-root operation to an object.
func (*SqlSchemaSetRootOp) ApplyWorldOp ¶
func (o *SqlSchemaSetRootOp) ApplyWorldOp( ctx context.Context, le *logrus.Entry, ws world.WorldState, sender peer.ID, ) (bool, error)
ApplyWorldOp applies the SQL schema set-root operation to a world.
func (*SqlSchemaSetRootOp) CloneMessageVT ¶
func (m *SqlSchemaSetRootOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*SqlSchemaSetRootOp) CloneVT ¶
func (m *SqlSchemaSetRootOp) CloneVT() *SqlSchemaSetRootOp
func (*SqlSchemaSetRootOp) EqualMessageVT ¶
func (this *SqlSchemaSetRootOp) EqualMessageVT(thatMsg any) bool
func (*SqlSchemaSetRootOp) EqualVT ¶
func (this *SqlSchemaSetRootOp) EqualVT(that *SqlSchemaSetRootOp) bool
func (*SqlSchemaSetRootOp) GetObjectKey ¶
func (x *SqlSchemaSetRootOp) GetObjectKey() string
func (*SqlSchemaSetRootOp) GetOperationTypeId ¶
func (o *SqlSchemaSetRootOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*SqlSchemaSetRootOp) GetRootRef ¶
func (x *SqlSchemaSetRootOp) GetRootRef() *bucket.ObjectRef
func (*SqlSchemaSetRootOp) MarshalBlock ¶
func (o *SqlSchemaSetRootOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the SQL schema set-root operation.
func (*SqlSchemaSetRootOp) MarshalJSON ¶
func (x *SqlSchemaSetRootOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the SqlSchemaSetRootOp to JSON.
func (*SqlSchemaSetRootOp) MarshalProtoJSON ¶
func (x *SqlSchemaSetRootOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the SqlSchemaSetRootOp message to JSON.
func (*SqlSchemaSetRootOp) MarshalProtoText ¶
func (x *SqlSchemaSetRootOp) MarshalProtoText() string
func (*SqlSchemaSetRootOp) MarshalToSizedBufferVT ¶
func (m *SqlSchemaSetRootOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SqlSchemaSetRootOp) MarshalToVT ¶
func (m *SqlSchemaSetRootOp) MarshalToVT(dAtA []byte) (int, error)
func (*SqlSchemaSetRootOp) MarshalVT ¶
func (m *SqlSchemaSetRootOp) MarshalVT() (dAtA []byte, err error)
func (*SqlSchemaSetRootOp) ProtoMessage ¶
func (*SqlSchemaSetRootOp) ProtoMessage()
func (*SqlSchemaSetRootOp) Reset ¶
func (x *SqlSchemaSetRootOp) Reset()
func (*SqlSchemaSetRootOp) SizeVT ¶
func (m *SqlSchemaSetRootOp) SizeVT() (n int)
func (*SqlSchemaSetRootOp) String ¶
func (x *SqlSchemaSetRootOp) String() string
func (*SqlSchemaSetRootOp) UnmarshalBlock ¶
func (o *SqlSchemaSetRootOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the SQL schema set-root operation.
func (*SqlSchemaSetRootOp) UnmarshalJSON ¶
func (x *SqlSchemaSetRootOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the SqlSchemaSetRootOp from JSON.
func (*SqlSchemaSetRootOp) UnmarshalProtoJSON ¶
func (x *SqlSchemaSetRootOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the SqlSchemaSetRootOp message from JSON.
func (*SqlSchemaSetRootOp) UnmarshalVT ¶
func (m *SqlSchemaSetRootOp) UnmarshalVT(dAtA []byte) error
func (*SqlSchemaSetRootOp) Validate ¶
func (o *SqlSchemaSetRootOp) Validate() error
Validate performs cursory checks on the operation.