v1

package
v0.0.0-...-03ee3a8 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ActionResize        = "resize"
	ActionFit           = "fit"
	ActionFill          = "fill"
	ActionBlur          = "blur"
	ActionSharpen       = "sharpen"
	ActionGamma         = "gamma"
	ActionContrast      = "contrast"
	ActionBrightness    = "brightness"
	ActionExtractColors = "extract-colors"
)

Task Action list

View Source
const (
	ServiceAPI_Head_FullMethodName        = "/v1.ServiceAPI/Head"
	ServiceAPI_Get_FullMethodName         = "/v1.ServiceAPI/Get"
	ServiceAPI_Refresh_FullMethodName     = "/v1.ServiceAPI/Refresh"
	ServiceAPI_SetManifest_FullMethodName = "/v1.ServiceAPI/SetManifest"
	ServiceAPI_GetManifest_FullMethodName = "/v1.ServiceAPI/GetManifest"
	ServiceAPI_Upload_FullMethodName      = "/v1.ServiceAPI/Upload"
	ServiceAPI_Delete_FullMethodName      = "/v1.ServiceAPI/Delete"
)

Variables

View Source
var (
	ResponseStatusCode_name = map[int32]string{
		0: "RESPONSE_STATUS_CODE_UNKNOWN_INVALID",
		1: "RESPONSE_STATUS_CODE_OK",
		2: "RESPONSE_STATUS_CODE_FAILED",
		3: "RESPONSE_STATUS_CODE_NOT_FOUND",
	}
	ResponseStatusCode_value = map[string]int32{
		"RESPONSE_STATUS_CODE_UNKNOWN_INVALID": 0,
		"RESPONSE_STATUS_CODE_OK":              1,
		"RESPONSE_STATUS_CODE_FAILED":          2,
		"RESPONSE_STATUS_CODE_NOT_FOUND":       3,
	}
)

Enum value maps for ResponseStatusCode.

View Source
var APIDocsSwaggerJSON string

APIDocsSwaggerJSON generated value from file

View Source
var (
	ErrUnsupportedAction = errors.New("unsupported action")
)

Error list...

View Source
var File_v1_action_proto protoreflect.FileDescriptor
View Source
var File_v1_manifest_proto protoreflect.FileDescriptor
View Source
var File_v1_meta_proto protoreflect.FileDescriptor
View Source
var File_v1_object_proto protoreflect.FileDescriptor
View Source
var File_v1_server_proto protoreflect.FileDescriptor
View Source
var ServiceAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.ServiceAPI",
	HandlerType: (*ServiceAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Head",
			Handler:    _ServiceAPI_Head_Handler,
		},
		{
			MethodName: "Refresh",
			Handler:    _ServiceAPI_Refresh_Handler,
		},
		{
			MethodName: "SetManifest",
			Handler:    _ServiceAPI_SetManifest_Handler,
		},
		{
			MethodName: "GetManifest",
			Handler:    _ServiceAPI_GetManifest_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _ServiceAPI_Delete_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Get",
			Handler:       _ServiceAPI_Get_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Upload",
			Handler:       _ServiceAPI_Upload_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "v1/server.proto",
}

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

Functions

func RegisterServiceAPIHandler

func RegisterServiceAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterServiceAPIHandler registers the http handlers for service ServiceAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterServiceAPIHandlerClient

func RegisterServiceAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceAPIClient) error

RegisterServiceAPIHandlerClient registers the http handlers for service ServiceAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ServiceAPIClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterServiceAPIHandlerFromEndpoint

func RegisterServiceAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterServiceAPIHandlerFromEndpoint is same as RegisterServiceAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterServiceAPIHandlerServer

func RegisterServiceAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceAPIServer) error

RegisterServiceAPIHandlerServer registers the http handlers for service ServiceAPI to "mux". UnaryRPC :call ServiceAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceAPIHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterServiceAPIServer

func RegisterServiceAPIServer(s grpc.ServiceRegistrar, srv ServiceAPIServer)

Types

type Action

type Action struct {
	Name   string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Values []*Param `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

Action which must be applied to source

func ActionFromModel

func ActionFromModel(act *models.Action) (*Action, error)

ActionFromModel creates new action task from model

func (*Action) Descriptor deprecated

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

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetName

func (x *Action) GetName() string

func (*Action) GetValues

func (x *Action) GetValues() []*Param

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

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

func (*Action) Reset

func (x *Action) Reset()

func (*Action) String

func (x *Action) String() string

func (*Action) ToModel

func (m *Action) ToModel() *models.Action

ToModel from protobuf object

type Data

type Data struct {

	// Types that are assignable to Item:
	//
	//	*Data_Info
	//	*Data_Content
	Item isData_Item `protobuf_oneof:"item"`
	Tags []string    `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*Data) Descriptor deprecated

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

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetContent

func (x *Data) GetContent() *DataContent

func (*Data) GetInfo

func (x *Data) GetInfo() *DataCustomID

func (*Data) GetItem

func (m *Data) GetItem() isData_Item

func (*Data) GetTags

func (x *Data) GetTags() []string

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

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

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

type DataContent

type DataContent struct {
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*DataContent) Descriptor deprecated

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

Deprecated: Use DataContent.ProtoReflect.Descriptor instead.

func (*DataContent) GetContent

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

func (*DataContent) ProtoMessage

func (*DataContent) ProtoMessage()

func (*DataContent) ProtoReflect

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

func (*DataContent) Reset

func (x *DataContent) Reset()

func (*DataContent) String

func (x *DataContent) String() string

type DataCustomID

type DataCustomID struct {
	Group     string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	CustomId  string `protobuf:"bytes,2,opt,name=custom_id,json=customId,proto3" json:"custom_id,omitempty"`
	Overwrite bool   `protobuf:"varint,3,opt,name=overwrite,proto3" json:"overwrite,omitempty"`
	// contains filtered or unexported fields
}

func (*DataCustomID) Descriptor deprecated

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

Deprecated: Use DataCustomID.ProtoReflect.Descriptor instead.

func (*DataCustomID) GetCustomId

func (x *DataCustomID) GetCustomId() string

func (*DataCustomID) GetGroup

func (x *DataCustomID) GetGroup() string

func (*DataCustomID) GetOverwrite

func (x *DataCustomID) GetOverwrite() bool

func (*DataCustomID) ProtoMessage

func (*DataCustomID) ProtoMessage()

func (*DataCustomID) ProtoReflect

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

func (*DataCustomID) Reset

func (x *DataCustomID) Reset()

func (*DataCustomID) String

func (x *DataCustomID) String() string

type DataManifest

type DataManifest struct {
	Manifest *Manifest `protobuf:"bytes,1,opt,name=manifest,proto3" json:"manifest,omitempty"`
	Group    string    `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"`
	// contains filtered or unexported fields
}

func (*DataManifest) Descriptor deprecated

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

Deprecated: Use DataManifest.ProtoReflect.Descriptor instead.

func (*DataManifest) GetGroup

func (x *DataManifest) GetGroup() string

func (*DataManifest) GetManifest

func (x *DataManifest) GetManifest() *Manifest

func (*DataManifest) ProtoMessage

func (*DataManifest) ProtoMessage()

func (*DataManifest) ProtoReflect

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

func (*DataManifest) Reset

func (x *DataManifest) Reset()

func (*DataManifest) String

func (x *DataManifest) String() string

type Data_Content

type Data_Content struct {
	Content *DataContent `protobuf:"bytes,2,opt,name=content,proto3,oneof"`
}

type Data_Info

type Data_Info struct {
	Info *DataCustomID `protobuf:"bytes,1,opt,name=info,proto3,oneof"`
}

type ItemMeta

type ItemMeta struct {
	Name        string        `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	NameExt     string        `protobuf:"bytes,2,opt,name=name_ext,json=nameExt,proto3" json:"name_ext,omitempty"`
	Type        string        `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	ContentType string        `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	HashId      string        `protobuf:"bytes,5,opt,name=hash_id,json=hashId,proto3" json:"hash_id,omitempty"`
	Width       int32         `protobuf:"varint,6,opt,name=width,proto3" json:"width,omitempty"`
	Height      int32         `protobuf:"varint,7,opt,name=height,proto3" json:"height,omitempty"`
	Size        uint64        `protobuf:"varint,8,opt,name=size,proto3" json:"size,omitempty"`
	Duration    int64         `protobuf:"varint,9,opt,name=duration,proto3" json:"duration,omitempty"`
	Bitrate     string        `protobuf:"bytes,10,opt,name=bitrate,proto3" json:"bitrate,omitempty"`
	Codec       string        `protobuf:"bytes,11,opt,name=codec,proto3" json:"codec,omitempty"`
	ExtJson     string        `protobuf:"bytes,12,opt,name=ext_json,json=extJson,proto3" json:"ext_json,omitempty"`
	Status      *ObjectStatus `protobuf:"bytes,13,opt,name=status,proto3" json:"status,omitempty"`
	UpdatedAt   int64         `protobuf:"varint,14,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

ItemMeta information

func MetaItemFromModel

func MetaItemFromModel(metaItem *models.ItemMeta) *ItemMeta

MetaItemFromModel creates new MetaItem from model

func (*ItemMeta) Descriptor deprecated

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

Deprecated: Use ItemMeta.ProtoReflect.Descriptor instead.

func (*ItemMeta) GetBitrate

func (x *ItemMeta) GetBitrate() string

func (*ItemMeta) GetCodec

func (x *ItemMeta) GetCodec() string

func (*ItemMeta) GetContentType

func (x *ItemMeta) GetContentType() string

func (*ItemMeta) GetDuration

func (x *ItemMeta) GetDuration() int64

func (*ItemMeta) GetExtJson

func (x *ItemMeta) GetExtJson() string

func (*ItemMeta) GetHashId

func (x *ItemMeta) GetHashId() string

func (*ItemMeta) GetHeight

func (x *ItemMeta) GetHeight() int32

func (*ItemMeta) GetName

func (x *ItemMeta) GetName() string

func (*ItemMeta) GetNameExt

func (x *ItemMeta) GetNameExt() string

func (*ItemMeta) GetSize

func (x *ItemMeta) GetSize() uint64

func (*ItemMeta) GetStatus

func (x *ItemMeta) GetStatus() *ObjectStatus

func (*ItemMeta) GetType

func (x *ItemMeta) GetType() string

func (*ItemMeta) GetUpdatedAt

func (x *ItemMeta) GetUpdatedAt() int64

func (*ItemMeta) GetWidth

func (x *ItemMeta) GetWidth() int32

func (*ItemMeta) ProtoMessage

func (*ItemMeta) ProtoMessage()

func (*ItemMeta) ProtoReflect

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

func (*ItemMeta) Reset

func (x *ItemMeta) Reset()

func (*ItemMeta) String

func (x *ItemMeta) String() string

func (*ItemMeta) ToModel

func (m *ItemMeta) ToModel() *models.ItemMeta

ToModel from protobuf object

type Manifest

type Manifest struct {
	Version      string               `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	ContentTypes []string             `protobuf:"bytes,2,rep,name=content_types,json=contentTypes,proto3" json:"content_types,omitempty"`
	Stages       []*ManifestTaskStage `protobuf:"bytes,3,rep,name=stages,proto3" json:"stages,omitempty"`
	// contains filtered or unexported fields
}

Manifest model object

func ManifestFromModel

func ManifestFromModel(man *models.Manifest) (*Manifest, error)

ManifestFromModel creates new manifest from model

func (*Manifest) Descriptor deprecated

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

Deprecated: Use Manifest.ProtoReflect.Descriptor instead.

func (*Manifest) GetContentTypes

func (x *Manifest) GetContentTypes() []string

func (*Manifest) GetStages

func (x *Manifest) GetStages() []*ManifestTaskStage

func (*Manifest) GetVersion

func (x *Manifest) GetVersion() string

func (*Manifest) ProtoMessage

func (*Manifest) ProtoMessage()

func (*Manifest) ProtoReflect

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

func (*Manifest) Reset

func (x *Manifest) Reset()

func (*Manifest) String

func (x *Manifest) String() string

func (*Manifest) ToModel

func (m *Manifest) ToModel() *models.Manifest

ToModel from protobuf object

type ManifestGroup

type ManifestGroup struct {
	Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	// contains filtered or unexported fields
}

func (*ManifestGroup) Descriptor deprecated

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

Deprecated: Use ManifestGroup.ProtoReflect.Descriptor instead.

func (*ManifestGroup) GetGroup

func (x *ManifestGroup) GetGroup() string

func (*ManifestGroup) ProtoMessage

func (*ManifestGroup) ProtoMessage()

func (*ManifestGroup) ProtoReflect

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

func (*ManifestGroup) Reset

func (x *ManifestGroup) Reset()

func (*ManifestGroup) String

func (x *ManifestGroup) String() string

type ManifestResponse

type ManifestResponse struct {
	Status   ResponseStatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=v1.ResponseStatusCode" json:"status,omitempty"`
	Message  string             `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Manifest *Manifest          `protobuf:"bytes,3,opt,name=manifest,proto3" json:"manifest,omitempty"`
	// contains filtered or unexported fields
}

func (*ManifestResponse) Descriptor deprecated

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

Deprecated: Use ManifestResponse.ProtoReflect.Descriptor instead.

func (*ManifestResponse) GetManifest

func (x *ManifestResponse) GetManifest() *Manifest

func (*ManifestResponse) GetMessage

func (x *ManifestResponse) GetMessage() string

func (*ManifestResponse) GetStatus

func (x *ManifestResponse) GetStatus() ResponseStatusCode

func (*ManifestResponse) ProtoMessage

func (*ManifestResponse) ProtoMessage()

func (*ManifestResponse) ProtoReflect

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

func (*ManifestResponse) Reset

func (x *ManifestResponse) Reset()

func (*ManifestResponse) String

func (x *ManifestResponse) String() string

type ManifestTask

type ManifestTask struct {
	Id      string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Source  string    `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`   // ” -> @ = original file
	Target  string    `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`   // Name of file
	Type    string    `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`       // Target type
	Actions []*Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` // Applied to source before save to target
	// contains filtered or unexported fields
}

ManifestTask file processing

func ManifestTaskFromModel

func ManifestTaskFromModel(ts *models.ManifestTask) (*ManifestTask, error)

ManifestTaskFromModel creates new manifest task from model

func (*ManifestTask) Descriptor deprecated

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

Deprecated: Use ManifestTask.ProtoReflect.Descriptor instead.

func (*ManifestTask) GetActions

func (x *ManifestTask) GetActions() []*Action

func (*ManifestTask) GetId

func (x *ManifestTask) GetId() string

func (*ManifestTask) GetSource

func (x *ManifestTask) GetSource() string

func (*ManifestTask) GetTarget

func (x *ManifestTask) GetTarget() string

func (*ManifestTask) GetType

func (x *ManifestTask) GetType() string

func (*ManifestTask) ProtoMessage

func (*ManifestTask) ProtoMessage()

func (*ManifestTask) ProtoReflect

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

func (*ManifestTask) Reset

func (x *ManifestTask) Reset()

func (*ManifestTask) String

func (x *ManifestTask) String() string

func (*ManifestTask) ToModel

func (m *ManifestTask) ToModel() *models.ManifestTask

ToModel from protobuf object

type ManifestTaskStage

type ManifestTaskStage struct {
	Name  string          `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Tasks []*ManifestTask `protobuf:"bytes,2,rep,name=tasks,proto3" json:"tasks,omitempty"`
	// contains filtered or unexported fields
}

ManifestTaskStage model object

func ManifestTaskStageFromModel

func ManifestTaskStageFromModel(stage *models.ManifestTaskStage) (*ManifestTaskStage, error)

ManifestTaskStageFromModel creates new manifest task stage from model

func (*ManifestTaskStage) Descriptor deprecated

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

Deprecated: Use ManifestTaskStage.ProtoReflect.Descriptor instead.

func (*ManifestTaskStage) GetName

func (x *ManifestTaskStage) GetName() string

func (*ManifestTaskStage) GetTasks

func (x *ManifestTaskStage) GetTasks() []*ManifestTask

func (*ManifestTaskStage) ProtoMessage

func (*ManifestTaskStage) ProtoMessage()

func (*ManifestTaskStage) ProtoReflect

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

func (*ManifestTaskStage) Reset

func (x *ManifestTaskStage) Reset()

func (*ManifestTaskStage) String

func (x *ManifestTaskStage) String() string

func (*ManifestTaskStage) ToModel

ToModel from protobuf object

type Meta

type Meta struct {
	ManifestVersion string      `protobuf:"bytes,1,opt,name=manifest_version,json=manifestVersion,proto3" json:"manifest_version,omitempty"`
	Main            *ItemMeta   `protobuf:"bytes,2,opt,name=main,proto3" json:"main,omitempty"`
	Items           []*ItemMeta `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"`
	Tags            []string    `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	CreatedAt       int64       `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt       int64       `protobuf:"varint,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Meta information of the file object

func MetaFromModel

func MetaFromModel(meta *models.Meta) *Meta

MetaFromModel creates new meta from model

func (*Meta) Descriptor deprecated

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

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) GetCreatedAt

func (x *Meta) GetCreatedAt() int64

func (*Meta) GetItems

func (x *Meta) GetItems() []*ItemMeta

func (*Meta) GetMain

func (x *Meta) GetMain() *ItemMeta

func (*Meta) GetManifestVersion

func (x *Meta) GetManifestVersion() string

func (*Meta) GetTags

func (x *Meta) GetTags() []string

func (*Meta) GetUpdatedAt

func (x *Meta) GetUpdatedAt() int64

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) ProtoReflect

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

func (*Meta) Reset

func (x *Meta) Reset()

func (*Meta) String

func (x *Meta) String() string

func (*Meta) ToModel

func (m *Meta) ToModel() *models.Meta

ToModel from protobuf object

type Object

type Object struct {
	Id          string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Bucket      string        `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Path        string        `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	HashId      string        `protobuf:"bytes,4,opt,name=hash_id,json=hashId,proto3" json:"hash_id,omitempty"`
	Status      *ObjectStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	ObjectType  string        `protobuf:"bytes,6,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"`
	ContentType string        `protobuf:"bytes,7,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	Manifest    *Manifest     `protobuf:"bytes,8,opt,name=manifest,proto3" json:"manifest,omitempty"`
	Meta        *Meta         `protobuf:"bytes,9,opt,name=meta,proto3" json:"meta,omitempty"`
	Size        uint32        `protobuf:"varint,10,opt,name=size,proto3" json:"size,omitempty"`
	CreatedAt   int64         `protobuf:"varint,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt   int64         `protobuf:"varint,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Object) Descriptor deprecated

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

Deprecated: Use Object.ProtoReflect.Descriptor instead.

func (*Object) GetBucket

func (x *Object) GetBucket() string

func (*Object) GetContentType

func (x *Object) GetContentType() string

func (*Object) GetCreatedAt

func (x *Object) GetCreatedAt() int64

func (*Object) GetHashId

func (x *Object) GetHashId() string

func (*Object) GetId

func (x *Object) GetId() string

func (*Object) GetManifest

func (x *Object) GetManifest() *Manifest

func (*Object) GetMeta

func (x *Object) GetMeta() *Meta

func (*Object) GetObjectType

func (x *Object) GetObjectType() string

func (*Object) GetPath

func (x *Object) GetPath() string

func (*Object) GetSize

func (x *Object) GetSize() uint32

func (*Object) GetStatus

func (x *Object) GetStatus() *ObjectStatus

func (*Object) GetUpdatedAt

func (x *Object) GetUpdatedAt() int64

func (*Object) ObjectID

func (m *Object) ObjectID() *ObjectID

ObjectID from the object

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) ProtoReflect

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

func (*Object) Reset

func (x *Object) Reset()

func (*Object) String

func (x *Object) String() string

func (*Object) ToModel

func (m *Object) ToModel() *models.Object

ToModel from protobuf object

type ObjectID

type ObjectID struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The list of possible required files. Will be taked only first existing file
	Name []string `protobuf:"bytes,2,rep,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func NewObjectGroupID

func NewObjectGroupID(group, id string) *ObjectID

NewObjectGroupID object

func NewObjectID

func NewObjectID(id string) *ObjectID

NewObjectID object

func NewObjectIDSubfile

func NewObjectIDSubfile(id string, name ...string) *ObjectID

NewObjectIDSubfile object

func (*ObjectID) Descriptor deprecated

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

Deprecated: Use ObjectID.ProtoReflect.Descriptor instead.

func (*ObjectID) GetId

func (x *ObjectID) GetId() string

func (*ObjectID) GetName

func (x *ObjectID) GetName() []string

func (*ObjectID) ProtoMessage

func (*ObjectID) ProtoMessage()

func (*ObjectID) ProtoReflect

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

func (*ObjectID) Reset

func (x *ObjectID) Reset()

func (*ObjectID) String

func (x *ObjectID) String() string

type ObjectIDNames

type ObjectIDNames struct {
	Id    string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
	// contains filtered or unexported fields
}

func (*ObjectIDNames) Descriptor deprecated

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

Deprecated: Use ObjectIDNames.ProtoReflect.Descriptor instead.

func (*ObjectIDNames) GetId

func (x *ObjectIDNames) GetId() string

func (*ObjectIDNames) GetNames

func (x *ObjectIDNames) GetNames() []string

func (*ObjectIDNames) ProtoMessage

func (*ObjectIDNames) ProtoMessage()

func (*ObjectIDNames) ProtoReflect

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

func (*ObjectIDNames) Reset

func (x *ObjectIDNames) Reset()

func (*ObjectIDNames) String

func (x *ObjectIDNames) String() string

type ObjectResponse

type ObjectResponse struct {

	// Types that are assignable to Object:
	//
	//	*ObjectResponse_Response
	//	*ObjectResponse_Content
	Object isObjectResponse_Object `protobuf_oneof:"object"`
	// contains filtered or unexported fields
}

func (*ObjectResponse) Descriptor deprecated

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

Deprecated: Use ObjectResponse.ProtoReflect.Descriptor instead.

func (*ObjectResponse) GetContent

func (x *ObjectResponse) GetContent() *DataContent

func (*ObjectResponse) GetObject

func (m *ObjectResponse) GetObject() isObjectResponse_Object

func (*ObjectResponse) GetResponse

func (x *ObjectResponse) GetResponse() *SimpleObjectResponse

func (*ObjectResponse) ProtoMessage

func (*ObjectResponse) ProtoMessage()

func (*ObjectResponse) ProtoReflect

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

func (*ObjectResponse) Reset

func (x *ObjectResponse) Reset()

func (*ObjectResponse) String

func (x *ObjectResponse) String() string

type ObjectResponse_Content

type ObjectResponse_Content struct {
	Content *DataContent `protobuf:"bytes,2,opt,name=content,proto3,oneof"`
}

type ObjectResponse_Response

type ObjectResponse_Response struct {
	Response *SimpleObjectResponse `protobuf:"bytes,1,opt,name=response,proto3,oneof"`
}

type ObjectStatus

type ObjectStatus struct {
	Status  string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ObjectStatus) Descriptor deprecated

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

Deprecated: Use ObjectStatus.ProtoReflect.Descriptor instead.

func (*ObjectStatus) GetMessage

func (x *ObjectStatus) GetMessage() string

func (*ObjectStatus) GetStatus

func (x *ObjectStatus) GetStatus() string

func (*ObjectStatus) ProtoMessage

func (*ObjectStatus) ProtoMessage()

func (*ObjectStatus) ProtoReflect

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

func (*ObjectStatus) Reset

func (x *ObjectStatus) Reset()

func (*ObjectStatus) String

func (x *ObjectStatus) String() string

type Param

type Param struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Types that are assignable to TestOneof:
	//
	//	*Param_ValueBytes
	//	*Param_ValueString
	//	*Param_ValueInt
	//	*Param_ValueFloat
	//	*Param_ValueStringArray
	TestOneof isParam_TestOneof `protobuf_oneof:"test_oneof"`
	// contains filtered or unexported fields
}

func (*Param) Descriptor deprecated

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

Deprecated: Use Param.ProtoReflect.Descriptor instead.

func (*Param) GetName

func (x *Param) GetName() string

func (*Param) GetTestOneof

func (m *Param) GetTestOneof() isParam_TestOneof

func (*Param) GetValueBytes

func (x *Param) GetValueBytes() []byte

func (*Param) GetValueFloat

func (x *Param) GetValueFloat() float64

func (*Param) GetValueInt

func (x *Param) GetValueInt() int64

func (*Param) GetValueString

func (x *Param) GetValueString() string

func (*Param) GetValueStringArray

func (x *Param) GetValueStringArray() string

func (*Param) ProtoMessage

func (*Param) ProtoMessage()

func (*Param) ProtoReflect

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

func (*Param) Reset

func (x *Param) Reset()

func (*Param) String

func (x *Param) String() string

func (*Param) Value

func (m *Param) Value() any

Value golang type

type Param_ValueBytes

type Param_ValueBytes struct {
	ValueBytes []byte `protobuf:"bytes,2,opt,name=value_bytes,json=valueBytes,proto3,oneof"`
}

type Param_ValueFloat

type Param_ValueFloat struct {
	ValueFloat float64 `protobuf:"fixed64,5,opt,name=value_float,json=valueFloat,proto3,oneof"`
}

type Param_ValueInt

type Param_ValueInt struct {
	ValueInt int64 `protobuf:"varint,4,opt,name=value_int,json=valueInt,proto3,oneof"`
}

type Param_ValueString

type Param_ValueString struct {
	ValueString string `protobuf:"bytes,3,opt,name=value_string,json=valueString,proto3,oneof"`
}

type Param_ValueStringArray

type Param_ValueStringArray struct {
	ValueStringArray string `protobuf:"bytes,6,opt,name=value_string_array,json=valueStringArray,proto3,oneof"`
}

type ResponseStatusCode

type ResponseStatusCode int32
const (
	ResponseStatusCode_RESPONSE_STATUS_CODE_UNKNOWN_INVALID ResponseStatusCode = 0
	ResponseStatusCode_RESPONSE_STATUS_CODE_OK              ResponseStatusCode = 1
	ResponseStatusCode_RESPONSE_STATUS_CODE_FAILED          ResponseStatusCode = 2
	ResponseStatusCode_RESPONSE_STATUS_CODE_NOT_FOUND       ResponseStatusCode = 3
)

func (ResponseStatusCode) Descriptor

func (ResponseStatusCode) Enum

func (ResponseStatusCode) EnumDescriptor deprecated

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

Deprecated: Use ResponseStatusCode.Descriptor instead.

func (ResponseStatusCode) IsFailed

func (code ResponseStatusCode) IsFailed() bool

IsFailed response status

func (ResponseStatusCode) IsNotFound

func (code ResponseStatusCode) IsNotFound() bool

IsNotFound response status

func (ResponseStatusCode) IsOK

func (code ResponseStatusCode) IsOK() bool

IsOK response status

func (ResponseStatusCode) IsUnknown

func (code ResponseStatusCode) IsUnknown() bool

IsUnknown response status

func (ResponseStatusCode) Number

func (ResponseStatusCode) String

func (x ResponseStatusCode) String() string

func (ResponseStatusCode) Type

type ServiceAPIClient

type ServiceAPIClient interface {
	// Get object information
	Head(ctx context.Context, in *ObjectID, opts ...grpc.CallOption) (*SimpleObjectResponse, error)
	// Get object and data
	Get(ctx context.Context, in *ObjectID, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ObjectResponse], error)
	// Refresh object and reprocess
	Refresh(ctx context.Context, in *ObjectID, opts ...grpc.CallOption) (*SimpleResponse, error)
	// SetManifest of the group
	SetManifest(ctx context.Context, in *DataManifest, opts ...grpc.CallOption) (*SimpleResponse, error)
	// GetManifest of the group
	GetManifest(ctx context.Context, in *ManifestGroup, opts ...grpc.CallOption) (*ManifestResponse, error)
	// Upload new file as a stream
	Upload(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[Data, SimpleObjectResponse], error)
	// Delete file object or subitems
	Delete(ctx context.Context, in *ObjectIDNames, opts ...grpc.CallOption) (*SimpleResponse, error)
}

ServiceAPIClient is the client API for ServiceAPI 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.

defined in the system.

func NewServiceAPIClient

func NewServiceAPIClient(cc grpc.ClientConnInterface) ServiceAPIClient

type ServiceAPIServer

type ServiceAPIServer interface {
	// Get object information
	Head(context.Context, *ObjectID) (*SimpleObjectResponse, error)
	// Get object and data
	Get(*ObjectID, grpc.ServerStreamingServer[ObjectResponse]) error
	// Refresh object and reprocess
	Refresh(context.Context, *ObjectID) (*SimpleResponse, error)
	// SetManifest of the group
	SetManifest(context.Context, *DataManifest) (*SimpleResponse, error)
	// GetManifest of the group
	GetManifest(context.Context, *ManifestGroup) (*ManifestResponse, error)
	// Upload new file as a stream
	Upload(grpc.ClientStreamingServer[Data, SimpleObjectResponse]) error
	// Delete file object or subitems
	Delete(context.Context, *ObjectIDNames) (*SimpleResponse, error)
	// contains filtered or unexported methods
}

ServiceAPIServer is the server API for ServiceAPI service. All implementations must embed UnimplementedServiceAPIServer for forward compatibility.

defined in the system.

type ServiceAPI_GetClient

type ServiceAPI_GetClient = grpc.ServerStreamingClient[ObjectResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ServiceAPI_GetServer

type ServiceAPI_GetServer = grpc.ServerStreamingServer[ObjectResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ServiceAPI_UploadClient

type ServiceAPI_UploadClient = grpc.ClientStreamingClient[Data, SimpleObjectResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ServiceAPI_UploadServer

type ServiceAPI_UploadServer = grpc.ClientStreamingServer[Data, SimpleObjectResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type SimpleObjectResponse

type SimpleObjectResponse struct {
	Status  ResponseStatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=v1.ResponseStatusCode" json:"status,omitempty"`
	Message string             `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Object  *Object            `protobuf:"bytes,3,opt,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*SimpleObjectResponse) Descriptor deprecated

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

Deprecated: Use SimpleObjectResponse.ProtoReflect.Descriptor instead.

func (*SimpleObjectResponse) GetMessage

func (x *SimpleObjectResponse) GetMessage() string

func (*SimpleObjectResponse) GetObject

func (x *SimpleObjectResponse) GetObject() *Object

func (*SimpleObjectResponse) GetStatus

func (*SimpleObjectResponse) ProtoMessage

func (*SimpleObjectResponse) ProtoMessage()

func (*SimpleObjectResponse) ProtoReflect

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

func (*SimpleObjectResponse) Reset

func (x *SimpleObjectResponse) Reset()

func (*SimpleObjectResponse) String

func (x *SimpleObjectResponse) String() string

type SimpleResponse

type SimpleResponse struct {
	Status  ResponseStatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=v1.ResponseStatusCode" json:"status,omitempty"`
	Message string             `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*SimpleResponse) Descriptor deprecated

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

Deprecated: Use SimpleResponse.ProtoReflect.Descriptor instead.

func (*SimpleResponse) GetMessage

func (x *SimpleResponse) GetMessage() string

func (*SimpleResponse) GetStatus

func (x *SimpleResponse) GetStatus() ResponseStatusCode

func (*SimpleResponse) ProtoMessage

func (*SimpleResponse) ProtoMessage()

func (*SimpleResponse) ProtoReflect

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

func (*SimpleResponse) Reset

func (x *SimpleResponse) Reset()

func (*SimpleResponse) String

func (x *SimpleResponse) String() string

type UnimplementedServiceAPIServer

type UnimplementedServiceAPIServer struct{}

UnimplementedServiceAPIServer must 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 (UnimplementedServiceAPIServer) Delete

func (UnimplementedServiceAPIServer) Get

func (UnimplementedServiceAPIServer) GetManifest

func (UnimplementedServiceAPIServer) Head

func (UnimplementedServiceAPIServer) Refresh

func (UnimplementedServiceAPIServer) SetManifest

func (UnimplementedServiceAPIServer) Upload

type UnsafeServiceAPIServer

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

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

Jump to

Keyboard shortcuts

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