common

package
v0.0.0-...-f5108b3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_common_meta_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Meta

type Meta struct {

	// 在添加数据需要村的定义
	// @gotags: json:"id"
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
	// 创建时间
	// @gotags: json:"created_at"
	CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at"`
	// 更新时间
	// @gotags: json:"updated_at"
	UpdatedAt int64 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at"`
	// contains filtered or unexported fields
}

func NewMeta

func NewMeta() *Meta

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) GetId

func (x *Meta) GetId() int64

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

type Scope

type Scope struct {
	Username string `json:"Username"`
}

控制用户访问数据的访问 操作数据的时候, 加上一个where条件 比如用户A10, 要去编辑用户B(12)的文章, id=10 and create_by = 10

Jump to

Keyboard shortcuts

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