_go

package module
v1.33.0-20240403022156... Latest Latest
Warning

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

Go to latest
Published: unknown License: MIT Imports: 4 Imported by: 1

Documentation

Index

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) Descriptor deprecated

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

Deprecated: Use Author.ProtoReflect.Descriptor instead.

func (*Author) GetContact

func (x *Author) GetContact() string

func (*Author) GetName

func (x *Author) GetName() string

func (*Author) ProtoMessage

func (*Author) ProtoMessage()

func (*Author) ProtoReflect

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

func (*Author) Reset

func (x *Author) Reset()

func (*Author) String

func (x *Author) String() string

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) Descriptor deprecated

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

Deprecated: Use Container.ProtoReflect.Descriptor instead.

func (*Container) GetImage

func (x *Container) GetImage() string

func (*Container) GetPorts

func (x *Container) GetPorts() []string

func (*Container) GetResource

func (x *Container) GetResource() *Resource

func (*Container) ProtoMessage

func (*Container) ProtoMessage()

func (*Container) ProtoReflect

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

func (*Container) Reset

func (x *Container) Reset()

func (*Container) String

func (x *Container) String() string

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) Descriptor deprecated

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

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) GetAuthor

func (x *Meta) GetAuthor() *Author

func (*Meta) GetContainers

func (x *Meta) GetContainers() []*Container

func (*Meta) GetTask

func (x *Meta) GetTask() *Task

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 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) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetCpu

func (x *Resource) GetCpu() string

func (*Resource) GetMem

func (x *Resource) GetMem() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

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

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

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"`                                             // 题目标签
	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) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetAttachmentUrl

func (x *Task) GetAttachmentUrl() string

func (*Task) GetCategory

func (x *Task) GetCategory() string

func (*Task) GetDescription

func (x *Task) GetDescription() string

func (*Task) GetFlag

func (x *Task) GetFlag() string

func (*Task) GetId

func (x *Task) GetId() string

func (*Task) GetLevel

func (x *Task) GetLevel() string

func (*Task) GetLevelCode

func (x *Task) GetLevelCode() Task_Level

func (*Task) GetName

func (x *Task) GetName() string

func (*Task) GetRefer

func (x *Task) GetRefer() string

func (*Task) GetTags

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

func (*Task) GetType

func (x *Task) GetType() string

func (*Task) GetTypeCode

func (x *Task) GetTypeCode() Task_Type

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

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

type Task_Type

type Task_Type int32
const (
	Task_UnknownType Task_Type = 0
	Task_Con         Task_Type = 1 // 容器
	Task_File        Task_Type = 2 // 附件
	Task_Ext         Task_Type = 3 // 外部
)

func (Task_Type) Descriptor

func (Task_Type) Descriptor() protoreflect.EnumDescriptor

func (Task_Type) Enum

func (x Task_Type) Enum() *Task_Type

func (Task_Type) EnumDescriptor deprecated

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

Deprecated: Use Task_Type.Descriptor instead.

func (Task_Type) Number

func (x Task_Type) Number() protoreflect.EnumNumber

func (Task_Type) String

func (x Task_Type) String() string

func (Task_Type) Type

Jump to

Keyboard shortcuts

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