add: story, actor, and scenes
This commit is contained in:
+1170
-30
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,16 @@ const (
|
||||
WebstoryService_CreateStory_FullMethodName = "/webstory.v1.WebstoryService/CreateStory"
|
||||
WebstoryService_UpdateStory_FullMethodName = "/webstory.v1.WebstoryService/UpdateStory"
|
||||
WebstoryService_DeleteStory_FullMethodName = "/webstory.v1.WebstoryService/DeleteStory"
|
||||
WebstoryService_GetScene_FullMethodName = "/webstory.v1.WebstoryService/GetScene"
|
||||
WebstoryService_ListScenes_FullMethodName = "/webstory.v1.WebstoryService/ListScenes"
|
||||
WebstoryService_CreateScene_FullMethodName = "/webstory.v1.WebstoryService/CreateScene"
|
||||
WebstoryService_UpdateScene_FullMethodName = "/webstory.v1.WebstoryService/UpdateScene"
|
||||
WebstoryService_DeleteScene_FullMethodName = "/webstory.v1.WebstoryService/DeleteScene"
|
||||
WebstoryService_GetActor_FullMethodName = "/webstory.v1.WebstoryService/GetActor"
|
||||
WebstoryService_ListActors_FullMethodName = "/webstory.v1.WebstoryService/ListActors"
|
||||
WebstoryService_CreateActor_FullMethodName = "/webstory.v1.WebstoryService/CreateActor"
|
||||
WebstoryService_UpdateActor_FullMethodName = "/webstory.v1.WebstoryService/UpdateActor"
|
||||
WebstoryService_DeleteActor_FullMethodName = "/webstory.v1.WebstoryService/DeleteActor"
|
||||
)
|
||||
|
||||
// WebstoryServiceClient is the client API for WebstoryService service.
|
||||
@@ -43,6 +53,26 @@ type WebstoryServiceClient interface {
|
||||
UpdateStory(ctx context.Context, in *UpdateStoryRequest, opts ...grpc.CallOption) (*Story, error)
|
||||
// DeleteStory deletes a story.
|
||||
DeleteStory(ctx context.Context, in *DeleteStoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// GetScene retrieves a scene by its resource name.
|
||||
GetScene(ctx context.Context, in *GetSceneRequest, opts ...grpc.CallOption) (*Scene, error)
|
||||
// ListScenes returns a list of scenes for a story.
|
||||
ListScenes(ctx context.Context, in *ListScenesRequest, opts ...grpc.CallOption) (*ListScenesResponse, error)
|
||||
// CreateScene creates a new scene in a story.
|
||||
CreateScene(ctx context.Context, in *CreateSceneRequest, opts ...grpc.CallOption) (*Scene, error)
|
||||
// UpdateScene updates an existing scene.
|
||||
UpdateScene(ctx context.Context, in *UpdateSceneRequest, opts ...grpc.CallOption) (*Scene, error)
|
||||
// DeleteScene deletes a scene.
|
||||
DeleteScene(ctx context.Context, in *DeleteSceneRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// GetActor retrieves an actor by its resource name.
|
||||
GetActor(ctx context.Context, in *GetActorRequest, opts ...grpc.CallOption) (*Actor, error)
|
||||
// ListActors returns a list of actors for a story.
|
||||
ListActors(ctx context.Context, in *ListActorsRequest, opts ...grpc.CallOption) (*ListActorsResponse, error)
|
||||
// CreateActor creates a new actor in a story.
|
||||
CreateActor(ctx context.Context, in *CreateActorRequest, opts ...grpc.CallOption) (*Actor, error)
|
||||
// UpdateActor updates an existing actor.
|
||||
UpdateActor(ctx context.Context, in *UpdateActorRequest, opts ...grpc.CallOption) (*Actor, error)
|
||||
// DeleteActor deletes an actor.
|
||||
DeleteActor(ctx context.Context, in *DeleteActorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type webstoryServiceClient struct {
|
||||
@@ -103,6 +133,106 @@ func (c *webstoryServiceClient) DeleteStory(ctx context.Context, in *DeleteStory
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) GetScene(ctx context.Context, in *GetSceneRequest, opts ...grpc.CallOption) (*Scene, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Scene)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_GetScene_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) ListScenes(ctx context.Context, in *ListScenesRequest, opts ...grpc.CallOption) (*ListScenesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListScenesResponse)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_ListScenes_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) CreateScene(ctx context.Context, in *CreateSceneRequest, opts ...grpc.CallOption) (*Scene, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Scene)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_CreateScene_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) UpdateScene(ctx context.Context, in *UpdateSceneRequest, opts ...grpc.CallOption) (*Scene, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Scene)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_UpdateScene_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) DeleteScene(ctx context.Context, in *DeleteSceneRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_DeleteScene_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) GetActor(ctx context.Context, in *GetActorRequest, opts ...grpc.CallOption) (*Actor, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Actor)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_GetActor_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) ListActors(ctx context.Context, in *ListActorsRequest, opts ...grpc.CallOption) (*ListActorsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListActorsResponse)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_ListActors_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) CreateActor(ctx context.Context, in *CreateActorRequest, opts ...grpc.CallOption) (*Actor, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Actor)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_CreateActor_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) UpdateActor(ctx context.Context, in *UpdateActorRequest, opts ...grpc.CallOption) (*Actor, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Actor)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_UpdateActor_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *webstoryServiceClient) DeleteActor(ctx context.Context, in *DeleteActorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, WebstoryService_DeleteActor_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// WebstoryServiceServer is the server API for WebstoryService service.
|
||||
// All implementations must embed UnimplementedWebstoryServiceServer
|
||||
// for forward compatibility.
|
||||
@@ -119,6 +249,26 @@ type WebstoryServiceServer interface {
|
||||
UpdateStory(context.Context, *UpdateStoryRequest) (*Story, error)
|
||||
// DeleteStory deletes a story.
|
||||
DeleteStory(context.Context, *DeleteStoryRequest) (*emptypb.Empty, error)
|
||||
// GetScene retrieves a scene by its resource name.
|
||||
GetScene(context.Context, *GetSceneRequest) (*Scene, error)
|
||||
// ListScenes returns a list of scenes for a story.
|
||||
ListScenes(context.Context, *ListScenesRequest) (*ListScenesResponse, error)
|
||||
// CreateScene creates a new scene in a story.
|
||||
CreateScene(context.Context, *CreateSceneRequest) (*Scene, error)
|
||||
// UpdateScene updates an existing scene.
|
||||
UpdateScene(context.Context, *UpdateSceneRequest) (*Scene, error)
|
||||
// DeleteScene deletes a scene.
|
||||
DeleteScene(context.Context, *DeleteSceneRequest) (*emptypb.Empty, error)
|
||||
// GetActor retrieves an actor by its resource name.
|
||||
GetActor(context.Context, *GetActorRequest) (*Actor, error)
|
||||
// ListActors returns a list of actors for a story.
|
||||
ListActors(context.Context, *ListActorsRequest) (*ListActorsResponse, error)
|
||||
// CreateActor creates a new actor in a story.
|
||||
CreateActor(context.Context, *CreateActorRequest) (*Actor, error)
|
||||
// UpdateActor updates an existing actor.
|
||||
UpdateActor(context.Context, *UpdateActorRequest) (*Actor, error)
|
||||
// DeleteActor deletes an actor.
|
||||
DeleteActor(context.Context, *DeleteActorRequest) (*emptypb.Empty, error)
|
||||
mustEmbedUnimplementedWebstoryServiceServer()
|
||||
}
|
||||
|
||||
@@ -144,6 +294,36 @@ func (UnimplementedWebstoryServiceServer) UpdateStory(context.Context, *UpdateSt
|
||||
func (UnimplementedWebstoryServiceServer) DeleteStory(context.Context, *DeleteStoryRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteStory not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) GetScene(context.Context, *GetSceneRequest) (*Scene, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetScene not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) ListScenes(context.Context, *ListScenesRequest) (*ListScenesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListScenes not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) CreateScene(context.Context, *CreateSceneRequest) (*Scene, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateScene not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) UpdateScene(context.Context, *UpdateSceneRequest) (*Scene, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateScene not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) DeleteScene(context.Context, *DeleteSceneRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteScene not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) GetActor(context.Context, *GetActorRequest) (*Actor, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetActor not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) ListActors(context.Context, *ListActorsRequest) (*ListActorsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListActors not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) CreateActor(context.Context, *CreateActorRequest) (*Actor, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateActor not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) UpdateActor(context.Context, *UpdateActorRequest) (*Actor, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateActor not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) DeleteActor(context.Context, *DeleteActorRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteActor not implemented")
|
||||
}
|
||||
func (UnimplementedWebstoryServiceServer) mustEmbedUnimplementedWebstoryServiceServer() {}
|
||||
func (UnimplementedWebstoryServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -255,6 +435,186 @@ func _WebstoryService_DeleteStory_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_GetScene_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetSceneRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).GetScene(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_GetScene_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).GetScene(ctx, req.(*GetSceneRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_ListScenes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListScenesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).ListScenes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_ListScenes_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).ListScenes(ctx, req.(*ListScenesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_CreateScene_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateSceneRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).CreateScene(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_CreateScene_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).CreateScene(ctx, req.(*CreateSceneRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_UpdateScene_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateSceneRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).UpdateScene(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_UpdateScene_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).UpdateScene(ctx, req.(*UpdateSceneRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_DeleteScene_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteSceneRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).DeleteScene(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_DeleteScene_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).DeleteScene(ctx, req.(*DeleteSceneRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_GetActor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetActorRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).GetActor(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_GetActor_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).GetActor(ctx, req.(*GetActorRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_ListActors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListActorsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).ListActors(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_ListActors_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).ListActors(ctx, req.(*ListActorsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_CreateActor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateActorRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).CreateActor(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_CreateActor_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).CreateActor(ctx, req.(*CreateActorRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_UpdateActor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateActorRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).UpdateActor(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_UpdateActor_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).UpdateActor(ctx, req.(*UpdateActorRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WebstoryService_DeleteActor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteActorRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WebstoryServiceServer).DeleteActor(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WebstoryService_DeleteActor_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WebstoryServiceServer).DeleteActor(ctx, req.(*DeleteActorRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// WebstoryService_ServiceDesc is the grpc.ServiceDesc for WebstoryService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -282,6 +642,46 @@ var WebstoryService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "DeleteStory",
|
||||
Handler: _WebstoryService_DeleteStory_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetScene",
|
||||
Handler: _WebstoryService_GetScene_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListScenes",
|
||||
Handler: _WebstoryService_ListScenes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateScene",
|
||||
Handler: _WebstoryService_CreateScene_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateScene",
|
||||
Handler: _WebstoryService_UpdateScene_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteScene",
|
||||
Handler: _WebstoryService_DeleteScene_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetActor",
|
||||
Handler: _WebstoryService_GetActor_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListActors",
|
||||
Handler: _WebstoryService_ListActors_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateActor",
|
||||
Handler: _WebstoryService_CreateActor_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateActor",
|
||||
Handler: _WebstoryService_UpdateActor_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteActor",
|
||||
Handler: _WebstoryService_DeleteActor_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "webstory/v1/api.proto",
|
||||
|
||||
@@ -49,6 +49,78 @@ service WebstoryService {
|
||||
option (google.api.http) = {delete: "/v1/{name=stories/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// GetScene retrieves a scene by its resource name.
|
||||
rpc GetScene(GetSceneRequest) returns (Scene) {
|
||||
option (google.api.http) = {get: "/v1/{name=stories/*/scenes/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// ListScenes returns a list of scenes for a story.
|
||||
rpc ListScenes(ListScenesRequest) returns (ListScenesResponse) {
|
||||
option (google.api.http) = {get: "/v1/{parent=stories/*}/scenes"};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// CreateScene creates a new scene in a story.
|
||||
rpc CreateScene(CreateSceneRequest) returns (Scene) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/{parent=stories/*}/scenes"
|
||||
body: "scene"
|
||||
};
|
||||
option (google.api.method_signature) = "parent,scene_id,scene";
|
||||
}
|
||||
|
||||
// UpdateScene updates an existing scene.
|
||||
rpc UpdateScene(UpdateSceneRequest) returns (Scene) {
|
||||
option (google.api.http) = {
|
||||
put: "/v1/{scene.name}"
|
||||
body: "scene"
|
||||
};
|
||||
option (google.api.method_signature) = "scene";
|
||||
}
|
||||
|
||||
// DeleteScene deletes a scene.
|
||||
rpc DeleteScene(DeleteSceneRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/v1/{name=stories/*/scenes/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// GetActor retrieves an actor by its resource name.
|
||||
rpc GetActor(GetActorRequest) returns (Actor) {
|
||||
option (google.api.http) = {get: "/v1/{name=stories/*/actors/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// ListActors returns a list of actors for a story.
|
||||
rpc ListActors(ListActorsRequest) returns (ListActorsResponse) {
|
||||
option (google.api.http) = {get: "/v1/{parent=stories/*}/actors"};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// CreateActor creates a new actor in a story.
|
||||
rpc CreateActor(CreateActorRequest) returns (Actor) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/{parent=stories/*}/actors"
|
||||
body: "actor"
|
||||
};
|
||||
option (google.api.method_signature) = "parent,actor_id,actor";
|
||||
}
|
||||
|
||||
// UpdateActor updates an existing actor.
|
||||
rpc UpdateActor(UpdateActorRequest) returns (Actor) {
|
||||
option (google.api.http) = {
|
||||
put: "/v1/{actor.name}"
|
||||
body: "actor"
|
||||
};
|
||||
option (google.api.method_signature) = "actor";
|
||||
}
|
||||
|
||||
// DeleteActor deletes an actor.
|
||||
rpc DeleteActor(DeleteActorRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/v1/{name=stories/*/actors/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
}
|
||||
|
||||
// Story represents a story resource in the webstory service.
|
||||
@@ -88,6 +160,12 @@ message Story {
|
||||
|
||||
// Output only. The version of the story for concurrency control.
|
||||
string etag = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// The scenes contained in this story.
|
||||
repeated Scene scenes = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// The actors in this story.
|
||||
repeated Actor actors = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
}
|
||||
|
||||
// GetStoryRequest is the request message for GetStory RPC.
|
||||
@@ -169,3 +247,256 @@ message DeleteStoryRequest {
|
||||
(google.api.resource_reference) = {type: "webstory.googleapis.com/Story"}
|
||||
];
|
||||
}
|
||||
|
||||
// Scene represents a scene resource in the webstory service.
|
||||
message Scene {
|
||||
option (google.api.resource) = {
|
||||
type: "webstory.googleapis.com/Scene"
|
||||
pattern: "stories/{story}/scenes/{scene}"
|
||||
plural: "scenes"
|
||||
};
|
||||
|
||||
// The resource name of the scene.
|
||||
// Format: stories/{story}/scenes/{scene}
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = OUTPUT_ONLY,
|
||||
(google.api.field_behavior) = IDENTIFIER
|
||||
];
|
||||
|
||||
// The ID of the scene, used as the final component of the resource name.
|
||||
string scene_id = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The scene number within the story.
|
||||
int32 scene_number = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The title of the scene.
|
||||
string title = 4 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The content of the scene.
|
||||
string content = 5;
|
||||
|
||||
// The description of the scene.
|
||||
string description = 6;
|
||||
|
||||
// Output only. The time when the scene was created.
|
||||
google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The time when the scene was last updated.
|
||||
google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The version of the scene for concurrency control.
|
||||
string etag = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
}
|
||||
|
||||
// GetSceneRequest is the request message for GetScene RPC.
|
||||
message GetSceneRequest {
|
||||
// The resource name of the scene to retrieve.
|
||||
// Format: stories/{story}/scenes/{scene}
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {type: "webstory.googleapis.com/Scene"}
|
||||
];
|
||||
}
|
||||
|
||||
// ListScenesRequest is the request message for ListScenes RPC.
|
||||
message ListScenesRequest {
|
||||
// The parent story that owns this collection of scenes.
|
||||
// Format: stories/{story}
|
||||
string parent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The maximum number of scenes to return. The service may return fewer than
|
||||
// this value. If unspecified, at most 50 scenes will be returned.
|
||||
// The maximum value is 1000; values above 1000 will be coerced to 1000.
|
||||
int32 page_size = 2;
|
||||
|
||||
// A page token, received from a previous ListScenes call.
|
||||
// Provide this to retrieve the subsequent page.
|
||||
// When paginating, all other parameters provided to ListScenes must match
|
||||
// the call that provided the page token.
|
||||
string page_token = 3;
|
||||
|
||||
// Optional. A filter expression that filters the scenes listed in the response.
|
||||
// Supported fields: scene_number, title.
|
||||
// Example: scene_number:>5 AND title:"climax"
|
||||
string filter = 4;
|
||||
|
||||
// Optional. The field to order the results by.
|
||||
// Supported fields: scene_number, create_time, title.
|
||||
// Default: scene_number (ascending order).
|
||||
string order_by = 5;
|
||||
}
|
||||
|
||||
// ListScenesResponse is the response message for ListScenes RPC.
|
||||
message ListScenesResponse {
|
||||
// The list of scenes.
|
||||
repeated Scene scenes = 1;
|
||||
|
||||
// A token, which can be sent as page_token to retrieve the next page.
|
||||
// If this field is omitted, there are no subsequent pages.
|
||||
string next_page_token = 2;
|
||||
|
||||
// The total number of scenes matching the filter.
|
||||
// This value may be an estimate.
|
||||
int32 total_size = 3;
|
||||
}
|
||||
|
||||
// CreateSceneRequest is the request message for CreateScene RPC.
|
||||
message CreateSceneRequest {
|
||||
// The parent story where this scene will be created.
|
||||
// Format: stories/{story}
|
||||
string parent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The ID to use for the scene, which will become the final component of
|
||||
// the scene's resource name.
|
||||
// This value should be 4-63 characters, and valid characters are
|
||||
// /[a-z][0-9]-/.
|
||||
string scene_id = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The scene to create.
|
||||
Scene scene = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// UpdateSceneRequest is the request message for UpdateScene RPC.
|
||||
message UpdateSceneRequest {
|
||||
// The scene to update.
|
||||
// The scene's name field is used to specify the resource to update.
|
||||
Scene scene = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The list of fields to update.
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
// DeleteSceneRequest is the request message for DeleteScene RPC.
|
||||
message DeleteSceneRequest {
|
||||
// The resource name of the scene to delete.
|
||||
// Format: stories/{story}/scenes/{scene}
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {type: "webstory.googleapis.com/Scene"}
|
||||
];
|
||||
}
|
||||
|
||||
// Actor represents an actor resource in the webstory service.
|
||||
message Actor {
|
||||
option (google.api.resource) = {
|
||||
type: "webstory.googleapis.com/Actor"
|
||||
pattern: "stories/{story}/actors/{actor}"
|
||||
plural: "actors"
|
||||
};
|
||||
|
||||
// The resource name of the actor.
|
||||
// Format: stories/{story}/actors/{actor}
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = OUTPUT_ONLY,
|
||||
(google.api.field_behavior) = IDENTIFIER
|
||||
];
|
||||
|
||||
// The ID of the actor, used as the final component of the resource name.
|
||||
string actor_id = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The name of the actor.
|
||||
string name_value = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The role or character name this actor plays in the story.
|
||||
string role = 4;
|
||||
|
||||
// Optional notes about the actor.
|
||||
string notes = 5;
|
||||
|
||||
// Output only. The time when the actor was created.
|
||||
google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The time when the actor was last updated.
|
||||
google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The version of the actor for concurrency control.
|
||||
string etag = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
}
|
||||
|
||||
// GetActorRequest is the request message for GetActor RPC.
|
||||
message GetActorRequest {
|
||||
// The resource name of the actor to retrieve.
|
||||
// Format: stories/{story}/actors/{actor}
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {type: "webstory.googleapis.com/Actor"}
|
||||
];
|
||||
}
|
||||
|
||||
// ListActorsRequest is the request message for ListActors RPC.
|
||||
message ListActorsRequest {
|
||||
// The parent story that owns this collection of actors.
|
||||
// Format: stories/{story}
|
||||
string parent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The maximum number of actors to return. The service may return fewer than
|
||||
// this value. If unspecified, at most 50 actors will be returned.
|
||||
// The maximum value is 1000; values above 1000 will be coerced to 1000.
|
||||
int32 page_size = 2;
|
||||
|
||||
// A page token, received from a previous ListActors call.
|
||||
// Provide this to retrieve the subsequent page.
|
||||
// When paginating, all other parameters provided to ListActors must match
|
||||
// the call that provided the page token.
|
||||
string page_token = 3;
|
||||
|
||||
// Optional. A filter expression that filters the actors listed in the response.
|
||||
// Supported fields: name_value, role.
|
||||
// Example: role:"protagonist"
|
||||
string filter = 4;
|
||||
|
||||
// Optional. The field to order the results by.
|
||||
// Supported fields: name_value, create_time.
|
||||
// Default: name_value (ascending order).
|
||||
string order_by = 5;
|
||||
}
|
||||
|
||||
// ListActorsResponse is the response message for ListActors RPC.
|
||||
message ListActorsResponse {
|
||||
// The list of actors.
|
||||
repeated Actor actors = 1;
|
||||
|
||||
// A token, which can be sent as page_token to retrieve the next page.
|
||||
// If this field is omitted, there are no subsequent pages.
|
||||
string next_page_token = 2;
|
||||
|
||||
// The total number of actors matching the filter.
|
||||
// This value may be an estimate.
|
||||
int32 total_size = 3;
|
||||
}
|
||||
|
||||
// CreateActorRequest is the request message for CreateActor RPC.
|
||||
message CreateActorRequest {
|
||||
// The parent story where this actor will be created.
|
||||
// Format: stories/{story}
|
||||
string parent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The ID to use for the actor, which will become the final component of
|
||||
// the actor's resource name.
|
||||
// This value should be 4-63 characters, and valid characters are
|
||||
// /[a-z][0-9]-/.
|
||||
string actor_id = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The actor to create.
|
||||
Actor actor = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// UpdateActorRequest is the request message for UpdateActor RPC.
|
||||
message UpdateActorRequest {
|
||||
// The actor to update.
|
||||
// The actor's name field is used to specify the resource to update.
|
||||
Actor actor = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The list of fields to update.
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
// DeleteActorRequest is the request message for DeleteActor RPC.
|
||||
message DeleteActorRequest {
|
||||
// The resource name of the actor to delete.
|
||||
// Format: stories/{story}/actors/{actor}
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {type: "webstory.googleapis.com/Actor"}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user