files

package
v0.0.0-...-aeb3b05 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileService_Create_FullMethodName = "/yandex.cloud.ai.files.v1.FileService/Create"
	FileService_Get_FullMethodName    = "/yandex.cloud.ai.files.v1.FileService/Get"
	FileService_GetUrl_FullMethodName = "/yandex.cloud.ai.files.v1.FileService/GetUrl"
	FileService_Update_FullMethodName = "/yandex.cloud.ai.files.v1.FileService/Update"
	FileService_Delete_FullMethodName = "/yandex.cloud.ai.files.v1.FileService/Delete"
	FileService_List_FullMethodName   = "/yandex.cloud.ai.files.v1.FileService/List"
)

Variables

View Source
var FileService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.ai.files.v1.FileService",
	HandlerType: (*FileServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _FileService_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _FileService_Get_Handler,
		},
		{
			MethodName: "GetUrl",
			Handler:    _FileService_GetUrl_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _FileService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _FileService_Delete_Handler,
		},
		{
			MethodName: "List",
			Handler:    _FileService_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/ai/files/v1/file_service.proto",
}

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

View Source
var File_yandex_cloud_ai_files_v1_file_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_files_v1_file_service_proto protoreflect.FileDescriptor

Functions

func RegisterFileServiceServer

func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)

Types

type CreateFileRequest

type CreateFileRequest struct {
	FolderId string `protobuf:"bytes,1,opt,name=folder_id,json=folderId,proto3" json:"folder_id,omitempty"`
	// Name of the file.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Description of the file.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// MIME type of the file, indicating the file's format (e.g., "application/pdf").
	// If not specified, will be deduced automatically based on the file content.
	MimeType string `protobuf:"bytes,4,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Binary content of the file.
	Content []byte `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
	// Set of key-value pairs to label the file.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Expiration configuration for the file.
	ExpirationConfig *common.ExpirationConfig `protobuf:"bytes,7,opt,name=expiration_config,json=expirationConfig,proto3" json:"expiration_config,omitempty"`
	// contains filtered or unexported fields
}

Request message for creating a new file.

func (*CreateFileRequest) Descriptor deprecated

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

Deprecated: Use CreateFileRequest.ProtoReflect.Descriptor instead.

func (*CreateFileRequest) GetContent

func (x *CreateFileRequest) GetContent() []byte

func (*CreateFileRequest) GetDescription

func (x *CreateFileRequest) GetDescription() string

func (*CreateFileRequest) GetExpirationConfig

func (x *CreateFileRequest) GetExpirationConfig() *common.ExpirationConfig

func (*CreateFileRequest) GetFolderId

func (x *CreateFileRequest) GetFolderId() string

func (*CreateFileRequest) GetLabels

func (x *CreateFileRequest) GetLabels() map[string]string

func (*CreateFileRequest) GetMimeType

func (x *CreateFileRequest) GetMimeType() string

func (*CreateFileRequest) GetName

func (x *CreateFileRequest) GetName() string

func (*CreateFileRequest) ProtoMessage

func (*CreateFileRequest) ProtoMessage()

func (*CreateFileRequest) ProtoReflect

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

func (*CreateFileRequest) Reset

func (x *CreateFileRequest) Reset()

func (*CreateFileRequest) SetContent

func (m *CreateFileRequest) SetContent(v []byte)

func (*CreateFileRequest) SetDescription

func (m *CreateFileRequest) SetDescription(v string)

func (*CreateFileRequest) SetExpirationConfig

func (m *CreateFileRequest) SetExpirationConfig(v *common.ExpirationConfig)

func (*CreateFileRequest) SetFolderId

func (m *CreateFileRequest) SetFolderId(v string)

func (*CreateFileRequest) SetLabels

func (m *CreateFileRequest) SetLabels(v map[string]string)

func (*CreateFileRequest) SetMimeType

func (m *CreateFileRequest) SetMimeType(v string)

func (*CreateFileRequest) SetName

func (m *CreateFileRequest) SetName(v string)

func (*CreateFileRequest) String

func (x *CreateFileRequest) String() string

type DeleteFileRequest

type DeleteFileRequest struct {

	// ID of the file to delete.
	FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for deleting a file by ID.

func (*DeleteFileRequest) Descriptor deprecated

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

Deprecated: Use DeleteFileRequest.ProtoReflect.Descriptor instead.

func (*DeleteFileRequest) GetFileId

func (x *DeleteFileRequest) GetFileId() string

func (*DeleteFileRequest) ProtoMessage

func (*DeleteFileRequest) ProtoMessage()

func (*DeleteFileRequest) ProtoReflect

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

func (*DeleteFileRequest) Reset

func (x *DeleteFileRequest) Reset()

func (*DeleteFileRequest) SetFileId

func (m *DeleteFileRequest) SetFileId(v string)

func (*DeleteFileRequest) String

func (x *DeleteFileRequest) String() string

type DeleteFileResponse

type DeleteFileResponse struct {
	// contains filtered or unexported fields
}

Response message for the delete operation.

func (*DeleteFileResponse) Descriptor deprecated

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

Deprecated: Use DeleteFileResponse.ProtoReflect.Descriptor instead.

func (*DeleteFileResponse) ProtoMessage

func (*DeleteFileResponse) ProtoMessage()

func (*DeleteFileResponse) ProtoReflect

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

func (*DeleteFileResponse) Reset

func (x *DeleteFileResponse) Reset()

func (*DeleteFileResponse) String

func (x *DeleteFileResponse) String() string

type File

type File struct {

	// Unique identifier of the file.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// ID of the folder that the file belongs to.
	FolderId string `protobuf:"bytes,2,opt,name=folder_id,json=folderId,proto3" json:"folder_id,omitempty"`
	// Name of the file.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Description of the file.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// MIME type of the file, indicating the file's format (e.g., "application/pdf")
	MimeType string `protobuf:"bytes,5,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Identifier of the subject who created this file.
	CreatedBy string `protobuf:"bytes,6,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	// Timestamp representing when the file was created.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Identifier of the subject who last updated this file.
	UpdatedBy string `protobuf:"bytes,8,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"`
	// Timestamp representing the last time this file was updated.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// Configuration for the expiration of the file, defining when and how the file will expire.
	ExpirationConfig *common.ExpirationConfig `protobuf:"bytes,10,opt,name=expiration_config,json=expirationConfig,proto3" json:"expiration_config,omitempty"`
	// Timestamp representing when the file will expire.
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	// Set of key-value pairs that can be used to organize and categorize the file.
	Labels map[string]string `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*File) Descriptor deprecated

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetCreatedAt

func (x *File) GetCreatedAt() *timestamppb.Timestamp

func (*File) GetCreatedBy

func (x *File) GetCreatedBy() string

func (*File) GetDescription

func (x *File) GetDescription() string

func (*File) GetExpirationConfig

func (x *File) GetExpirationConfig() *common.ExpirationConfig

func (*File) GetExpiresAt

func (x *File) GetExpiresAt() *timestamppb.Timestamp

func (*File) GetFolderId

func (x *File) GetFolderId() string

func (*File) GetId

func (x *File) GetId() string

func (*File) GetLabels

func (x *File) GetLabels() map[string]string

func (*File) GetMimeType

func (x *File) GetMimeType() string

func (*File) GetName

func (x *File) GetName() string

func (*File) GetUpdatedAt

func (x *File) GetUpdatedAt() *timestamppb.Timestamp

func (*File) GetUpdatedBy

func (x *File) GetUpdatedBy() string

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

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

func (*File) Reset

func (x *File) Reset()

func (*File) SetCreatedAt

func (m *File) SetCreatedAt(v *timestamppb.Timestamp)

func (*File) SetCreatedBy

func (m *File) SetCreatedBy(v string)

func (*File) SetDescription

func (m *File) SetDescription(v string)

func (*File) SetExpirationConfig

func (m *File) SetExpirationConfig(v *common.ExpirationConfig)

func (*File) SetExpiresAt

func (m *File) SetExpiresAt(v *timestamppb.Timestamp)

func (*File) SetFolderId

func (m *File) SetFolderId(v string)

func (*File) SetId

func (m *File) SetId(v string)

func (*File) SetLabels

func (m *File) SetLabels(v map[string]string)

func (*File) SetMimeType

func (m *File) SetMimeType(v string)

func (*File) SetName

func (m *File) SetName(v string)

func (*File) SetUpdatedAt

func (m *File) SetUpdatedAt(v *timestamppb.Timestamp)

func (*File) SetUpdatedBy

func (m *File) SetUpdatedBy(v string)

func (*File) String

func (x *File) String() string

type FileServiceClient

type FileServiceClient interface {
	// Create a new file.
	Create(ctx context.Context, in *CreateFileRequest, opts ...grpc.CallOption) (*File, error)
	// Retrieve details of a specific file by its ID.
	Get(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*File, error)
	// Retrieve a URL for accessing or downloading a specific file.
	GetUrl(ctx context.Context, in *GetFileUrlRequest, opts ...grpc.CallOption) (*GetFileUrlResponse, error)
	// Update an existing file.
	Update(ctx context.Context, in *UpdateFileRequest, opts ...grpc.CallOption) (*File, error)
	// Delete a file by its ID.
	Delete(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*DeleteFileResponse, error)
	// List files in a specific folder.
	List(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error)
}

FileServiceClient is the client API for FileService 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.

FileService provides operations for managing files.

type FileServiceServer

type FileServiceServer interface {
	// Create a new file.
	Create(context.Context, *CreateFileRequest) (*File, error)
	// Retrieve details of a specific file by its ID.
	Get(context.Context, *GetFileRequest) (*File, error)
	// Retrieve a URL for accessing or downloading a specific file.
	GetUrl(context.Context, *GetFileUrlRequest) (*GetFileUrlResponse, error)
	// Update an existing file.
	Update(context.Context, *UpdateFileRequest) (*File, error)
	// Delete a file by its ID.
	Delete(context.Context, *DeleteFileRequest) (*DeleteFileResponse, error)
	// List files in a specific folder.
	List(context.Context, *ListFilesRequest) (*ListFilesResponse, error)
}

FileServiceServer is the server API for FileService service. All implementations should embed UnimplementedFileServiceServer for forward compatibility.

FileService provides operations for managing files.

type GetFileRequest

type GetFileRequest struct {

	// ID of the file to retrieve.
	FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for retrieving a file by ID.

func (*GetFileRequest) Descriptor deprecated

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

Deprecated: Use GetFileRequest.ProtoReflect.Descriptor instead.

func (*GetFileRequest) GetFileId

func (x *GetFileRequest) GetFileId() string

func (*GetFileRequest) ProtoMessage

func (*GetFileRequest) ProtoMessage()

func (*GetFileRequest) ProtoReflect

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

func (*GetFileRequest) Reset

func (x *GetFileRequest) Reset()

func (*GetFileRequest) SetFileId

func (m *GetFileRequest) SetFileId(v string)

func (*GetFileRequest) String

func (x *GetFileRequest) String() string

type GetFileUrlRequest

type GetFileUrlRequest struct {

	// ID of the file which the URL is requested.
	FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for retrieving the URL of a specific file.

func (*GetFileUrlRequest) Descriptor deprecated

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

Deprecated: Use GetFileUrlRequest.ProtoReflect.Descriptor instead.

func (*GetFileUrlRequest) GetFileId

func (x *GetFileUrlRequest) GetFileId() string

func (*GetFileUrlRequest) ProtoMessage

func (*GetFileUrlRequest) ProtoMessage()

func (*GetFileUrlRequest) ProtoReflect

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

func (*GetFileUrlRequest) Reset

func (x *GetFileUrlRequest) Reset()

func (*GetFileUrlRequest) SetFileId

func (m *GetFileUrlRequest) SetFileId(v string)

func (*GetFileUrlRequest) String

func (x *GetFileUrlRequest) String() string

type GetFileUrlResponse

type GetFileUrlResponse struct {

	// URL that can be used to access or download the file.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the URL to access the requested file.

func (*GetFileUrlResponse) Descriptor deprecated

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

Deprecated: Use GetFileUrlResponse.ProtoReflect.Descriptor instead.

func (*GetFileUrlResponse) GetUrl

func (x *GetFileUrlResponse) GetUrl() string

func (*GetFileUrlResponse) ProtoMessage

func (*GetFileUrlResponse) ProtoMessage()

func (*GetFileUrlResponse) ProtoReflect

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

func (*GetFileUrlResponse) Reset

func (x *GetFileUrlResponse) Reset()

func (*GetFileUrlResponse) SetUrl

func (m *GetFileUrlResponse) SetUrl(v string)

func (*GetFileUrlResponse) String

func (x *GetFileUrlResponse) String() string

type ListFilesRequest

type ListFilesRequest struct {

	// Folder ID from which to list files.
	FolderId string `protobuf:"bytes,1,opt,name=folder_id,json=folderId,proto3" json:"folder_id,omitempty"`
	// Maximum number of files to return per page.
	PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Token to retrieve the next page of results.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request message for listing files in a specific folder.

func (*ListFilesRequest) Descriptor deprecated

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

Deprecated: Use ListFilesRequest.ProtoReflect.Descriptor instead.

func (*ListFilesRequest) GetFolderId

func (x *ListFilesRequest) GetFolderId() string

func (*ListFilesRequest) GetPageSize

func (x *ListFilesRequest) GetPageSize() int64

func (*ListFilesRequest) GetPageToken

func (x *ListFilesRequest) GetPageToken() string

func (*ListFilesRequest) ProtoMessage

func (*ListFilesRequest) ProtoMessage()

func (*ListFilesRequest) ProtoReflect

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

func (*ListFilesRequest) Reset

func (x *ListFilesRequest) Reset()

func (*ListFilesRequest) SetFolderId

func (m *ListFilesRequest) SetFolderId(v string)

func (*ListFilesRequest) SetPageSize

func (m *ListFilesRequest) SetPageSize(v int64)

func (*ListFilesRequest) SetPageToken

func (m *ListFilesRequest) SetPageToken(v string)

func (*ListFilesRequest) String

func (x *ListFilesRequest) String() string

type ListFilesResponse

type ListFilesResponse struct {

	// List of files in the specified folder.
	Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	// Token to retrieve the next page of results.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response message for the list operation.

func (*ListFilesResponse) Descriptor deprecated

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

Deprecated: Use ListFilesResponse.ProtoReflect.Descriptor instead.

func (*ListFilesResponse) GetFiles

func (x *ListFilesResponse) GetFiles() []*File

func (*ListFilesResponse) GetNextPageToken

func (x *ListFilesResponse) GetNextPageToken() string

func (*ListFilesResponse) ProtoMessage

func (*ListFilesResponse) ProtoMessage()

func (*ListFilesResponse) ProtoReflect

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

func (*ListFilesResponse) Reset

func (x *ListFilesResponse) Reset()

func (*ListFilesResponse) SetFiles

func (m *ListFilesResponse) SetFiles(v []*File)

func (*ListFilesResponse) SetNextPageToken

func (m *ListFilesResponse) SetNextPageToken(v string)

func (*ListFilesResponse) String

func (x *ListFilesResponse) String() string

type UnimplementedFileServiceServer

type UnimplementedFileServiceServer struct{}

UnimplementedFileServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedFileServiceServer) Create

func (UnimplementedFileServiceServer) Delete

func (UnimplementedFileServiceServer) Get

func (UnimplementedFileServiceServer) GetUrl

func (UnimplementedFileServiceServer) List

func (UnimplementedFileServiceServer) Update

type UnsafeFileServiceServer

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

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

type UpdateFileRequest

type UpdateFileRequest struct {

	// ID of the file to update.
	FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"`
	// Field mask specifying which fields to update.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// New name for the file.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// New description for the file.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// New expiration configuration for the file.
	ExpirationConfig *common.ExpirationConfig `protobuf:"bytes,5,opt,name=expiration_config,json=expirationConfig,proto3" json:"expiration_config,omitempty"`
	// New set of labels for the file.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request message for updating an existing file.

func (*UpdateFileRequest) Descriptor deprecated

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

Deprecated: Use UpdateFileRequest.ProtoReflect.Descriptor instead.

func (*UpdateFileRequest) GetDescription

func (x *UpdateFileRequest) GetDescription() string

func (*UpdateFileRequest) GetExpirationConfig

func (x *UpdateFileRequest) GetExpirationConfig() *common.ExpirationConfig

func (*UpdateFileRequest) GetFileId

func (x *UpdateFileRequest) GetFileId() string

func (*UpdateFileRequest) GetLabels

func (x *UpdateFileRequest) GetLabels() map[string]string

func (*UpdateFileRequest) GetName

func (x *UpdateFileRequest) GetName() string

func (*UpdateFileRequest) GetUpdateMask

func (x *UpdateFileRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateFileRequest) ProtoMessage

func (*UpdateFileRequest) ProtoMessage()

func (*UpdateFileRequest) ProtoReflect

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

func (*UpdateFileRequest) Reset

func (x *UpdateFileRequest) Reset()

func (*UpdateFileRequest) SetDescription

func (m *UpdateFileRequest) SetDescription(v string)

func (*UpdateFileRequest) SetExpirationConfig

func (m *UpdateFileRequest) SetExpirationConfig(v *common.ExpirationConfig)

func (*UpdateFileRequest) SetFileId

func (m *UpdateFileRequest) SetFileId(v string)

func (*UpdateFileRequest) SetLabels

func (m *UpdateFileRequest) SetLabels(v map[string]string)

func (*UpdateFileRequest) SetName

func (m *UpdateFileRequest) SetName(v string)

func (*UpdateFileRequest) SetUpdateMask

func (m *UpdateFileRequest) SetUpdateMask(v *fieldmaskpb.FieldMask)

func (*UpdateFileRequest) String

func (x *UpdateFileRequest) String() string

Jump to

Keyboard shortcuts

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