v1

package
v0.0.0-...-ae3c806 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Post_Create_FullMethodName           = "/spaceone.api.board.v1.Post/create"
	Post_Update_FullMethodName           = "/spaceone.api.board.v1.Post/update"
	Post_SendNotification_FullMethodName = "/spaceone.api.board.v1.Post/send_notification"
	Post_Delete_FullMethodName           = "/spaceone.api.board.v1.Post/delete"
	Post_Get_FullMethodName              = "/spaceone.api.board.v1.Post/get"
	Post_List_FullMethodName             = "/spaceone.api.board.v1.Post/list"
	Post_Stat_FullMethodName             = "/spaceone.api.board.v1.Post/stat"
)

Variables

View Source
var (
	CreatePostRequest_ResourceGroup_name = map[int32]string{
		0: "RESOURCE_GROUP_NONE",
		1: "SYSTEM",
		2: "DOMAIN",
	}
	CreatePostRequest_ResourceGroup_value = map[string]int32{
		"RESOURCE_GROUP_NONE": 0,
		"SYSTEM":              1,
		"DOMAIN":              2,
	}
)

Enum value maps for CreatePostRequest_ResourceGroup.

View Source
var (
	PostInfo_ResourceGroup_name = map[int32]string{
		0: "RESOURCE_GROUP_NONE",
		1: "SYSTEM",
		2: "DOMAIN",
	}
	PostInfo_ResourceGroup_value = map[string]int32{
		"RESOURCE_GROUP_NONE": 0,
		"SYSTEM":              1,
		"DOMAIN":              2,
	}
)

Enum value maps for PostInfo_ResourceGroup.

View Source
var File_spaceone_api_board_v1_post_proto protoreflect.FileDescriptor
View Source
var Post_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "spaceone.api.board.v1.Post",
	HandlerType: (*PostServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "create",
			Handler:    _Post_Create_Handler,
		},
		{
			MethodName: "update",
			Handler:    _Post_Update_Handler,
		},
		{
			MethodName: "send_notification",
			Handler:    _Post_SendNotification_Handler,
		},
		{
			MethodName: "delete",
			Handler:    _Post_Delete_Handler,
		},
		{
			MethodName: "get",
			Handler:    _Post_Get_Handler,
		},
		{
			MethodName: "list",
			Handler:    _Post_List_Handler,
		},
		{
			MethodName: "stat",
			Handler:    _Post_Stat_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "spaceone/api/board/v1/post.proto",
}

Post_ServiceDesc is the grpc.ServiceDesc for Post service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPostServer

func RegisterPostServer(s grpc.ServiceRegistrar, srv PostServer)

Types

type CreatePostRequest

type CreatePostRequest struct {
	BoardType string `protobuf:"bytes,1,opt,name=board_type,json=boardType,proto3" json:"board_type,omitempty"`
	Title     string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Contents  string `protobuf:"bytes,3,opt,name=contents,proto3" json:"contents,omitempty"`
	// +optional
	Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	// +optional
	Files []string `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
	// +optional
	Options *_struct.Struct `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"`
	// +optional
	Writer        string                          `protobuf:"bytes,7,opt,name=writer,proto3" json:"writer,omitempty"`
	ResourceGroup CreatePostRequest_ResourceGroup `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}
{
   "board_type": "NOTICE",
   "category": "developer",
   "title": "title",
   "contents": "This is contents.",
   "files": ["file-123456789012"],
   "options": {"is_popup": true},
   "writer": "user1",
   "resource_group": "DOMAIN",
}

func (*CreatePostRequest) Descriptor deprecated

func (*CreatePostRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreatePostRequest.ProtoReflect.Descriptor instead.

func (*CreatePostRequest) GetBoardType

func (x *CreatePostRequest) GetBoardType() string

func (*CreatePostRequest) GetCategory

func (x *CreatePostRequest) GetCategory() string

func (*CreatePostRequest) GetContents

func (x *CreatePostRequest) GetContents() string

func (*CreatePostRequest) GetFiles

func (x *CreatePostRequest) GetFiles() []string

func (*CreatePostRequest) GetOptions

func (x *CreatePostRequest) GetOptions() *_struct.Struct

func (*CreatePostRequest) GetResourceGroup

func (x *CreatePostRequest) GetResourceGroup() CreatePostRequest_ResourceGroup

func (*CreatePostRequest) GetTitle

func (x *CreatePostRequest) GetTitle() string

func (*CreatePostRequest) GetWriter

func (x *CreatePostRequest) GetWriter() string

func (*CreatePostRequest) ProtoMessage

func (*CreatePostRequest) ProtoMessage()

func (*CreatePostRequest) ProtoReflect

func (x *CreatePostRequest) ProtoReflect() protoreflect.Message

func (*CreatePostRequest) Reset

func (x *CreatePostRequest) Reset()

func (*CreatePostRequest) String

func (x *CreatePostRequest) String() string

type CreatePostRequest_ResourceGroup

type CreatePostRequest_ResourceGroup int32
const (
	CreatePostRequest_RESOURCE_GROUP_NONE CreatePostRequest_ResourceGroup = 0
	CreatePostRequest_SYSTEM              CreatePostRequest_ResourceGroup = 1
	CreatePostRequest_DOMAIN              CreatePostRequest_ResourceGroup = 2
)

func (CreatePostRequest_ResourceGroup) Descriptor

func (CreatePostRequest_ResourceGroup) Enum

func (CreatePostRequest_ResourceGroup) EnumDescriptor deprecated

func (CreatePostRequest_ResourceGroup) EnumDescriptor() ([]byte, []int)

Deprecated: Use CreatePostRequest_ResourceGroup.Descriptor instead.

func (CreatePostRequest_ResourceGroup) Number

func (CreatePostRequest_ResourceGroup) String

func (CreatePostRequest_ResourceGroup) Type

type PostClient

type PostClient interface {
	// Creates a new Post under a specific Board. You must specify the `board_id`, `title`, and `contents`. The parameter `category` is not required but can be set in the scope of `categories` specified in the parent Board. You can make the new Post pinned or pop up by adjusting the parameters.
	Create(ctx context.Context, in *CreatePostRequest, opts ...grpc.CallOption) (*PostInfo, error)
	// Updates a specific Post. You can make changes in Post settings, except `board_id`, `post_id`, and `domain_id`.
	Update(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*PostInfo, error)
	// Not Implemented
	SendNotification(ctx context.Context, in *PostRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// Deletes a specific Post. You must specify the `post_id` of the Post to delete, and the `board_id` of the Board where the child Post to delete belongs.
	Delete(ctx context.Context, in *PostRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// Gets a specific Post. You must specify the `post_id` of the Post to get, and the `board_id` of the Board where the child Post to get belongs. Prints detailed information about the Post.
	Get(ctx context.Context, in *PostRequest, opts ...grpc.CallOption) (*PostInfo, error)
	// Gets a list of all Posts. You can use a query to get a filtered list of Posts.
	List(ctx context.Context, in *PostSearchQuery, opts ...grpc.CallOption) (*PostsInfo, error)
	Stat(ctx context.Context, in *PostStatQuery, opts ...grpc.CallOption) (*_struct.Struct, error)
}

PostClient is the client API for Post service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewPostClient

func NewPostClient(cc grpc.ClientConnInterface) PostClient

type PostInfo

type PostInfo struct {
	BoardType     string                 `protobuf:"bytes,1,opt,name=board_type,json=boardType,proto3" json:"board_type,omitempty"`
	PostId        string                 `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	Category      string                 `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
	Title         string                 `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	Contents      string                 `protobuf:"bytes,5,opt,name=contents,proto3" json:"contents,omitempty"`
	Options       *_struct.Struct        `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"`
	ViewCount     int32                  `protobuf:"varint,7,opt,name=view_count,json=viewCount,proto3" json:"view_count,omitempty"`
	Writer        string                 `protobuf:"bytes,8,opt,name=writer,proto3" json:"writer,omitempty"`
	Files         *_struct.ListValue     `protobuf:"bytes,9,opt,name=files,proto3" json:"files,omitempty"`
	ResourceGroup PostInfo_ResourceGroup `` /* 152-byte string literal not displayed */
	DomainId      string                 `protobuf:"bytes,21,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	UserId        string                 `protobuf:"bytes,22,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	CreatedAt     string                 `protobuf:"bytes,31,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt     string                 `protobuf:"bytes,32,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}
{
         "board_type": "NOTICE",
         "post_id": "post-123456789012",
         "category": "developer",
         "title": "title",
         "contents": "This is contents.",
         "options": {
             "is_pinned": false,
             "is_popup": true
         },
         "view_count": 0,
         "writer": "user1",
         "resource_group": "DOMAIN",
         "domain_id": "domain-123456789012",
         "user_id": "user1@email.com",
         "created_at": "2022-01-01T01:06:23.732Z",
         "updated_at": "2022-01-01T01:06:23.732Z"
}

func (*PostInfo) Descriptor deprecated

func (*PostInfo) Descriptor() ([]byte, []int)

Deprecated: Use PostInfo.ProtoReflect.Descriptor instead.

func (*PostInfo) GetBoardType

func (x *PostInfo) GetBoardType() string

func (*PostInfo) GetCategory

func (x *PostInfo) GetCategory() string

func (*PostInfo) GetContents

func (x *PostInfo) GetContents() string

func (*PostInfo) GetCreatedAt

func (x *PostInfo) GetCreatedAt() string

func (*PostInfo) GetDomainId

func (x *PostInfo) GetDomainId() string

func (*PostInfo) GetFiles

func (x *PostInfo) GetFiles() *_struct.ListValue

func (*PostInfo) GetOptions

func (x *PostInfo) GetOptions() *_struct.Struct

func (*PostInfo) GetPostId

func (x *PostInfo) GetPostId() string

func (*PostInfo) GetResourceGroup

func (x *PostInfo) GetResourceGroup() PostInfo_ResourceGroup

func (*PostInfo) GetTitle

func (x *PostInfo) GetTitle() string

func (*PostInfo) GetUpdatedAt

func (x *PostInfo) GetUpdatedAt() string

func (*PostInfo) GetUserId

func (x *PostInfo) GetUserId() string

func (*PostInfo) GetViewCount

func (x *PostInfo) GetViewCount() int32

func (*PostInfo) GetWriter

func (x *PostInfo) GetWriter() string

func (*PostInfo) ProtoMessage

func (*PostInfo) ProtoMessage()

func (*PostInfo) ProtoReflect

func (x *PostInfo) ProtoReflect() protoreflect.Message

func (*PostInfo) Reset

func (x *PostInfo) Reset()

func (*PostInfo) String

func (x *PostInfo) String() string

type PostInfo_ResourceGroup

type PostInfo_ResourceGroup int32
const (
	PostInfo_RESOURCE_GROUP_NONE PostInfo_ResourceGroup = 0
	PostInfo_SYSTEM              PostInfo_ResourceGroup = 1
	PostInfo_DOMAIN              PostInfo_ResourceGroup = 2
)

func (PostInfo_ResourceGroup) Descriptor

func (PostInfo_ResourceGroup) Enum

func (PostInfo_ResourceGroup) EnumDescriptor deprecated

func (PostInfo_ResourceGroup) EnumDescriptor() ([]byte, []int)

Deprecated: Use PostInfo_ResourceGroup.Descriptor instead.

func (PostInfo_ResourceGroup) Number

func (PostInfo_ResourceGroup) String

func (x PostInfo_ResourceGroup) String() string

func (PostInfo_ResourceGroup) Type

type PostRequest

type PostRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// contains filtered or unexported fields
}
{
   "post_id": "post-2118473ce15e"
}

func (*PostRequest) Descriptor deprecated

func (*PostRequest) Descriptor() ([]byte, []int)

Deprecated: Use PostRequest.ProtoReflect.Descriptor instead.

func (*PostRequest) GetPostId

func (x *PostRequest) GetPostId() string

func (*PostRequest) ProtoMessage

func (*PostRequest) ProtoMessage()

func (*PostRequest) ProtoReflect

func (x *PostRequest) ProtoReflect() protoreflect.Message

func (*PostRequest) Reset

func (x *PostRequest) Reset()

func (*PostRequest) String

func (x *PostRequest) String() string

type PostSearchQuery

type PostSearchQuery struct {

	// +optional
	Query *v2.Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// +optional
	BoardType string `protobuf:"bytes,2,opt,name=board_type,json=boardType,proto3" json:"board_type,omitempty"`
	// +optional
	PostId string `protobuf:"bytes,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// +optional
	Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	// +optional
	Writer string `protobuf:"bytes,5,opt,name=writer,proto3" json:"writer,omitempty"`
	// +optional
	IsPinned bool `protobuf:"varint,6,opt,name=is_pinned,json=isPinned,proto3" json:"is_pinned,omitempty"`
	// +optional
	IsPopup bool `protobuf:"varint,7,opt,name=is_popup,json=isPopup,proto3" json:"is_popup,omitempty"`
	// +optional
	DomainId string `protobuf:"bytes,21,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	// contains filtered or unexported fields
}
{
   "query": {}
}

func (*PostSearchQuery) Descriptor deprecated

func (*PostSearchQuery) Descriptor() ([]byte, []int)

Deprecated: Use PostSearchQuery.ProtoReflect.Descriptor instead.

func (*PostSearchQuery) GetBoardType

func (x *PostSearchQuery) GetBoardType() string

func (*PostSearchQuery) GetCategory

func (x *PostSearchQuery) GetCategory() string

func (*PostSearchQuery) GetDomainId

func (x *PostSearchQuery) GetDomainId() string

func (*PostSearchQuery) GetIsPinned

func (x *PostSearchQuery) GetIsPinned() bool

func (*PostSearchQuery) GetIsPopup

func (x *PostSearchQuery) GetIsPopup() bool

func (*PostSearchQuery) GetPostId

func (x *PostSearchQuery) GetPostId() string

func (*PostSearchQuery) GetQuery

func (x *PostSearchQuery) GetQuery() *v2.Query

func (*PostSearchQuery) GetWriter

func (x *PostSearchQuery) GetWriter() string

func (*PostSearchQuery) ProtoMessage

func (*PostSearchQuery) ProtoMessage()

func (*PostSearchQuery) ProtoReflect

func (x *PostSearchQuery) ProtoReflect() protoreflect.Message

func (*PostSearchQuery) Reset

func (x *PostSearchQuery) Reset()

func (*PostSearchQuery) String

func (x *PostSearchQuery) String() string

type PostServer

type PostServer interface {
	// Creates a new Post under a specific Board. You must specify the `board_id`, `title`, and `contents`. The parameter `category` is not required but can be set in the scope of `categories` specified in the parent Board. You can make the new Post pinned or pop up by adjusting the parameters.
	Create(context.Context, *CreatePostRequest) (*PostInfo, error)
	// Updates a specific Post. You can make changes in Post settings, except `board_id`, `post_id`, and `domain_id`.
	Update(context.Context, *UpdatePostRequest) (*PostInfo, error)
	// Not Implemented
	SendNotification(context.Context, *PostRequest) (*empty.Empty, error)
	// Deletes a specific Post. You must specify the `post_id` of the Post to delete, and the `board_id` of the Board where the child Post to delete belongs.
	Delete(context.Context, *PostRequest) (*empty.Empty, error)
	// Gets a specific Post. You must specify the `post_id` of the Post to get, and the `board_id` of the Board where the child Post to get belongs. Prints detailed information about the Post.
	Get(context.Context, *PostRequest) (*PostInfo, error)
	// Gets a list of all Posts. You can use a query to get a filtered list of Posts.
	List(context.Context, *PostSearchQuery) (*PostsInfo, error)
	Stat(context.Context, *PostStatQuery) (*_struct.Struct, error)
	// contains filtered or unexported methods
}

PostServer is the server API for Post service. All implementations must embed UnimplementedPostServer for forward compatibility

type PostStatQuery

type PostStatQuery struct {
	Query *v2.StatisticsQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// contains filtered or unexported fields
}

func (*PostStatQuery) Descriptor deprecated

func (*PostStatQuery) Descriptor() ([]byte, []int)

Deprecated: Use PostStatQuery.ProtoReflect.Descriptor instead.

func (*PostStatQuery) GetQuery

func (x *PostStatQuery) GetQuery() *v2.StatisticsQuery

func (*PostStatQuery) ProtoMessage

func (*PostStatQuery) ProtoMessage()

func (*PostStatQuery) ProtoReflect

func (x *PostStatQuery) ProtoReflect() protoreflect.Message

func (*PostStatQuery) Reset

func (x *PostStatQuery) Reset()

func (*PostStatQuery) String

func (x *PostStatQuery) String() string

type PostsInfo

type PostsInfo struct {
	Results    []*PostInfo `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	TotalCount int32       `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	// contains filtered or unexported fields
}
{
     "results": [
         {
             "board_id": "board-b9aa34e65c60",
             "post_id": "post-2118473ce15e",
             "category": "spaceone",
             "title": "title2",
             "contents": "this is contents2.",
             "options": {
                 "is_popup": false,
                 "is_pinned": true
             },
             "view_count": 3,
             "writer": "seolmin2",
             "files": ["file-123456789012"],
             "resource_group": "DOMAIN",
             "domain_id": "domain-58010aa2e451",
             "user_id": "user1@email.com",
             "created_at": "2022-06-13T01:06:23.732Z",
             "updated_at": "2022-06-13T01:06:23.732Z"
         },
         {
             "board_id": "board-b9aa34e65c60",
             "post_id": "post-532ae1191233",
             "category": "flower",
             "title": "작업공지",
             "contents": "This is description",
             "options": {
                 "is_pinned": true,
                 "is_popup": true
             },
             "writer": "권설민",
             "files": ["file-123456789022"],
             "resource_group": "DOMAIN",
             "user_id": "supervisor",
             "created_at": "2022-06-10T07:01:44.384Z",
             "updated_at": "2022-06-10T07:01:44.384Z"
         }
     ],
     "total_count": 2
}

func (*PostsInfo) Descriptor deprecated

func (*PostsInfo) Descriptor() ([]byte, []int)

Deprecated: Use PostsInfo.ProtoReflect.Descriptor instead.

func (*PostsInfo) GetResults

func (x *PostsInfo) GetResults() []*PostInfo

func (*PostsInfo) GetTotalCount

func (x *PostsInfo) GetTotalCount() int32

func (*PostsInfo) ProtoMessage

func (*PostsInfo) ProtoMessage()

func (*PostsInfo) ProtoReflect

func (x *PostsInfo) ProtoReflect() protoreflect.Message

func (*PostsInfo) Reset

func (x *PostsInfo) Reset()

func (*PostsInfo) String

func (x *PostsInfo) String() string

type UnimplementedPostServer

type UnimplementedPostServer struct {
}

UnimplementedPostServer must be embedded to have forward compatible implementations.

func (UnimplementedPostServer) Create

func (UnimplementedPostServer) Delete

func (UnimplementedPostServer) Get

func (UnimplementedPostServer) List

func (UnimplementedPostServer) SendNotification

func (UnimplementedPostServer) Stat

func (UnimplementedPostServer) Update

type UnsafePostServer

type UnsafePostServer interface {
	// contains filtered or unexported methods
}

UnsafePostServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PostServer will result in compilation errors.

type UpdatePostRequest

type UpdatePostRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// +optional
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// +optional
	Contents string `protobuf:"bytes,3,opt,name=contents,proto3" json:"contents,omitempty"`
	// +optional
	Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	// +optional
	Files []string `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
	// +optional
	Options *_struct.Struct `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"`
	// +optional
	Writer string `protobuf:"bytes,7,opt,name=writer,proto3" json:"writer,omitempty"`
	// contains filtered or unexported fields
}
{
     "post_id": "post-2118473ce15e",
     "title": "title2",
     "contents": "this is contents2.",
     "category": "developer",
     "options": {
         "is_popup": false,
         "is_pinned": true
     },
     "writer": "user1"
}

func (*UpdatePostRequest) Descriptor deprecated

func (*UpdatePostRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdatePostRequest.ProtoReflect.Descriptor instead.

func (*UpdatePostRequest) GetCategory

func (x *UpdatePostRequest) GetCategory() string

func (*UpdatePostRequest) GetContents

func (x *UpdatePostRequest) GetContents() string

func (*UpdatePostRequest) GetFiles

func (x *UpdatePostRequest) GetFiles() []string

func (*UpdatePostRequest) GetOptions

func (x *UpdatePostRequest) GetOptions() *_struct.Struct

func (*UpdatePostRequest) GetPostId

func (x *UpdatePostRequest) GetPostId() string

func (*UpdatePostRequest) GetTitle

func (x *UpdatePostRequest) GetTitle() string

func (*UpdatePostRequest) GetWriter

func (x *UpdatePostRequest) GetWriter() string

func (*UpdatePostRequest) ProtoMessage

func (*UpdatePostRequest) ProtoMessage()

func (*UpdatePostRequest) ProtoReflect

func (x *UpdatePostRequest) ProtoReflect() protoreflect.Message

func (*UpdatePostRequest) Reset

func (x *UpdatePostRequest) Reset()

func (*UpdatePostRequest) String

func (x *UpdatePostRequest) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL