Documentation ¶
Index ¶
- Variables
- type Author
- type Container
- func (*Container) Descriptor() ([]byte, []int)deprecated
- func (x *Container) GetImage() string
- func (x *Container) GetPorts() []string
- func (x *Container) GetResource() *Resource
- func (*Container) ProtoMessage()
- func (x *Container) ProtoReflect() protoreflect.Message
- func (x *Container) Reset()
- func (x *Container) String() string
- type Meta
- type Resource
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetAttachmentUrl() string
- func (x *Task) GetBanEgress() bool
- func (x *Task) GetCategory() string
- func (x *Task) GetDescription() string
- func (x *Task) GetFlag() string
- func (x *Task) GetId() string
- func (x *Task) GetLevel() string
- func (x *Task) GetLevelCode() Task_Level
- func (x *Task) GetName() string
- func (x *Task) GetRefer() string
- func (x *Task) GetTags() []string
- func (x *Task) GetType() string
- func (x *Task) GetTypeCode() Task_Type
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- type Task_Level
- type Task_Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Task_Type_name = map[int32]string{ 0: "UnknownType", 1: "Con", 2: "File", 3: "Ext", } Task_Type_value = map[string]int32{ "UnknownType": 0, "Con": 1, "File": 2, "Ext": 3, } )
Enum value maps for Task_Type.
View Source
var ( Task_Level_name = map[int32]string{ 0: "UnknownLevel", 1: "Checkin", 2: "Easy", 3: "Medium", 4: "Hard", } Task_Level_value = map[string]int32{ "UnknownLevel": 0, "Checkin": 1, "Easy": 2, "Medium": 3, "Hard": 4, } )
Enum value maps for Task_Level.
View Source
var File_meta_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Nickname 制作者ID Contact string `protobuf:"bytes,2,opt,name=contact,proto3" json:"contact,omitempty"` // Email 制作者邮箱 // contains filtered or unexported fields }
题目制作者信息
func (*Author) ProtoReflect ¶
func (x *Author) ProtoReflect() protoreflect.Message
type Container ¶
type Container struct { Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` // 命名空间/镜像名称 Ports []string `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports,omitempty"` // 需要对外暴露的端口,port/protocol eg .80/tcp Resource *Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` // 运行资源限制 // contains filtered or unexported fields }
func (*Container) ProtoReflect ¶
func (x *Container) ProtoReflect() protoreflect.Message
type Meta ¶
type Meta struct { Author *Author `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"` Task *Task `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` Containers []*Container `protobuf:"bytes,3,rep,name=containers,proto3" json:"containers,omitempty"` // contains filtered or unexported fields }
题目元信息
func (*Meta) ProtoReflect ¶
func (x *Meta) ProtoReflect() protoreflect.Message
type Resource ¶
type Resource struct { // k8s.io.apimachinery.pkg.api.resource.Quantity Cpu string `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty"` Mem string `protobuf:"bytes,2,opt,name=mem,proto3" json:"mem,omitempty"` // contains filtered or unexported fields }
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
type Task ¶
type Task struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 题目ID 唯一值 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 题目名称 Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // 题目类型 - con,file,ext Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"` // 题目分类 Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // 题目描述 Level string `protobuf:"bytes,6,opt,name=level,proto3" json:"level,omitempty"` // 题目难度 Flag *string `protobuf:"bytes,7,opt,name=flag,proto3,oneof" json:"flag,omitempty"` // 题目 Flag, 不填写则为动态 Flag AttachmentUrl *string `protobuf:"bytes,8,opt,name=attachment_url,json=attachmentUrl,proto3,oneof" json:"attachment_url,omitempty"` // 题目附件地址 Refer *string `protobuf:"bytes,9,opt,name=refer,proto3,oneof" json:"refer,omitempty"` // 题目来源 Tags []string `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` // 题目标签 // 是否禁止出网 - 基于 nerwork policy // - 仅支持私有k8s,公有云需要支持网络相关组件,如阿里云需要 pro 版 BanEgress bool `protobuf:"varint,11,opt,name=ban_egress,json=banEgress,proto3" json:"ban_egress,omitempty"` TypeCode Task_Type `protobuf:"varint,91,opt,name=type_code,json=typeCode,proto3,enum=ctfhub.meta.Task_Type" json:"type_code,omitempty"` LevelCode Task_Level `protobuf:"varint,92,opt,name=level_code,json=levelCode,proto3,enum=ctfhub.meta.Task_Level" json:"level_code,omitempty"` // contains filtered or unexported fields }
题目信息
func (*Task) GetLevelCode ¶
func (x *Task) GetLevelCode() Task_Level
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type Task_Level ¶
type Task_Level int32
const ( Task_UnknownLevel Task_Level = 0 Task_Checkin Task_Level = 1 // 签到-入门 Task_Easy Task_Level = 2 // 简单-初级 Task_Medium Task_Level = 3 // 中等-中级 Task_Hard Task_Level = 4 // 困难-高级 )
func (Task_Level) Descriptor ¶
func (Task_Level) Descriptor() protoreflect.EnumDescriptor
func (Task_Level) Enum ¶
func (x Task_Level) Enum() *Task_Level
func (Task_Level) EnumDescriptor
deprecated
func (Task_Level) EnumDescriptor() ([]byte, []int)
Deprecated: Use Task_Level.Descriptor instead.
func (Task_Level) Number ¶
func (x Task_Level) Number() protoreflect.EnumNumber
func (Task_Level) String ¶
func (x Task_Level) String() string
func (Task_Level) Type ¶
func (Task_Level) Type() protoreflect.EnumType
type Task_Type ¶
type Task_Type int32
func (Task_Type) Descriptor ¶
func (Task_Type) Descriptor() protoreflect.EnumDescriptor
func (Task_Type) Number ¶
func (x Task_Type) Number() protoreflect.EnumNumber
func (Task_Type) Type ¶
func (Task_Type) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.