pb

package
v0.0.0-...-b16e635 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_models_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type File

type File struct {
	Uuid    string                 `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name    string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Bytes   int64                  `protobuf:"varint,3,opt,name=bytes,proto3" json:"bytes,omitempty"`
	Created *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created,proto3" json:"created,omitempty"`
	Updated *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated,proto3" json:"updated,omitempty"`
	// contains filtered or unexported fields
}

func (*File) Descriptor deprecated

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetBytes

func (x *File) GetBytes() int64

func (*File) GetCreated

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

func (*File) GetName

func (x *File) GetName() string

func (*File) GetUpdated

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

func (*File) GetUuid

func (x *File) GetUuid() 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) String

func (x *File) String() string

func (*File) ToModel

func (p *File) ToModel() (*FileModel, error)

ToModel converts a File to its GORM model.

type FileModel

type FileModel struct {
	Uuid    string       `gorm:"not null;unique;primaryKey"`
	Name    string       `gorm:"not null;index"`
	Bytes   int64        `gorm:"not null"`
	Created sql.NullTime `gorm:"not null;autoCreateTime;<-:create"`
	Updated sql.NullTime `gorm:"autoUpdateTime"`
}

FileModel is the GORM model for pb.File.

func (*FileModel) TableName

func (m *FileModel) TableName() string

func (*FileModel) ToProto

func (m *FileModel) ToProto() (*File, error)

ToProto converts a FileModel to its protobuf representation.

Jump to

Keyboard shortcuts

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