Compare commits

..

10 Commits

Author SHA1 Message Date
huangkun 4e392e9746 feat 添加nas安装教程 2024-10-24 15:10:29 +08:00
huangkun 39c1422b25 fix bugs! 2024-10-09 11:52:54 +08:00
huangkun f959aa3fc3 feat add mp3tool 2024-10-09 11:21:58 +08:00
huangkun 582342636f feat 添加一些CPP代码 2024-09-13 15:11:12 +08:00
huangkun b802b6600c fix bug:路径写错了 2024-08-01 17:46:40 +08:00
huangkun fc9e814837 feat 添加thinkbook 2024安装ubuntu问题处理 2024-08-01 17:46:06 +08:00
huangkun 8a74dc4a0c temp commint 2023-08-15 14:28:07 +08:00
bing 22cd5dc58e feat nothing 2023-03-16 17:45:08 +08:00
bing 5bc94f98c2 feat 修改k8s镜像仓库 2023-03-16 17:41:46 +08:00
bing c740258b24 feat 添加一些小工具 2023-03-13 16:17:29 +08:00
82 changed files with 5070 additions and 320 deletions

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM golang:1.19 as builder
WORKDIR /workdir
ADD go.mod go.mod
ADD go.sum go.sum
ENV GOPROXY=https://goproxy.cn,direct GO111MODULE=on
RUN go mod download
ADD main.go main.go
ADD pkg pkg
RUN GOOS=linux GOARCH=amd64 go build -o /appname main.go
FROM scratch
COPY --from=builder /workdir/appname /
ENTRYPOINT [ "/appname" ]

BIN
calicoctl Normal file

Binary file not shown.

4
cpp/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
**/CMakeFiles
**/Makefile
**/cmake_install.cmake
**/main

View File

376
cpp/fonts/CMakeCache.txt Normal file
View File

@ -0,0 +1,376 @@
# This is the CMakeCache file.
# For build in directory: /home/kun1h/git/blog/cpp/fonts
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Path to a program.
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar
//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib
//Flags used by the CXX compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the CXX compiler during DEBUG builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the CXX compiler during RELEASE builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//C compiler
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib
//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Path to a program.
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
//Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
//Value Computed by CMake.
CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/home/kun1h/git/blog/cpp/fonts/CMakeFiles/pkgRedirects
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
//Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld
//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
//Flags used by the linker during the creation of modules during
// all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_NM:FILEPATH=/usr/bin/nm
//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=fonts
//Path to a program.
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
//Path to a program.
CMAKE_READELF:FILEPATH=/usr/bin/readelf
//Flags used by the linker during the creation of shared libraries
// during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO
//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_STRIP:FILEPATH=/usr/bin/strip
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Value Computed by CMake
fonts_BINARY_DIR:STATIC=/home/kun1h/git/blog/cpp/fonts/reader
//Value Computed by CMake
fonts_IS_TOP_LEVEL:STATIC=OFF
//Value Computed by CMake
fonts_SOURCE_DIR:STATIC=/home/kun1h/git/blog/cpp/fonts/reader
########################
# INTERNAL cache entries
########################
//ADVANCED property for variable: CMAKE_ADDR2LINE
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/home/kun1h/git/blog/cpp/fonts
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=26
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=5
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//ADVANCED property for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_DLLTOOL
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/home/kun1h/git/blog/cpp/fonts
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=0
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=3
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_READELF
CMAKE_READELF-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//uname command
CMAKE_UNAME:INTERNAL=/usr/bin/uname
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//linker supports push/pop state
_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE

6
cpp/fonts/CMakeLists.txt Normal file
View File

@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.10)
project(fonts)
add_subdirectory(core)
add_subdirectory(reader)
add_executable(main main.cpp)
target_link_libraries(main core reader)

View File

@ -0,0 +1,29 @@
include_directories(../)
include_directories(./)
include_directories(./tables)
include_directories(./tables/name)
set(SOURCE
tables/name/name_id.h
tables/name/name.h
tables/name/name.cpp
tables/name/platform_id.h
tables/name/name_head.h
tables/name/name_head.cpp
tables/table.h
tables/table.cpp
tables/table_name.h
font.cpp
font.h
head.cpp
head.h
tables/cmap/cmap.h
tables/cmap/cmap.cpp
tables/cmap/encoding_record.h
tables/cmap/encoding_record.cpp
tables/cmap/header.cpp
tables/cmap/header.h
tables/cmap/platform.h
tables/cmap/tables.h
)
project(fonts)
add_library(core SHARED ${SOURCE})

24
cpp/fonts/core/font.cpp Normal file
View File

@ -0,0 +1,24 @@
#include "font.h"
#include "tables/table_name.h"
#include "reader/buffer.h"
#include <iostream>
#include "../reader/file.h"
font::font(const char* fontFile){
file rd(fontFile);
path = rd.getPath();
read(&rd);
}
void font::read(reader* rd){
//读取字体头
head.read(rd);
//读取表信息
table.read(rd, head.getTableCount());
}
void font::display(){
std::cout<<"font file"<<path<<" readed."<<std::endl;
head.display();
table.display();
}

21
cpp/fonts/core/font.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef __FONT_H__
#define __FONT_H__
#include "tables/table.h"
#include "head.h"
#include <string>
class font
{
private:
FontTable table;
fontHead head;
std::string path;
public:
font(){};
font(const char*);
~font(){};
void read(reader*);
void display();
};
#endif

25
cpp/fonts/core/head.cpp Normal file
View File

@ -0,0 +1,25 @@
#include "head.h"
#include <iostream>
void fontHead::read(reader* rd){
//先读4字节看是ttf还是ttc
auto ft = rd->readString(4);
if(ft == "ttcf"){
throw "not support ttc";
}
rd->seek(0);
verMain = rd->readUint16();
verSub = rd->readUint16();
tableCount = rd->readUint16();
auto arg1 = rd->readUint16();
args.push_back(arg1);
auto arg2 = rd->readUint16();
args.push_back(arg2);
auto arg3 = rd->readUint16();
args.push_back(arg3);
}
void fontHead::display(){
std::cout<<"this is header"<<std::endl;
std::cout<<"version: "<<verMain<<"."<<verSub<<"\ttableCount: "<<tableCount<<std::endl;
}

26
cpp/fonts/core/head.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef __HEAD_H__
#define __HEAD_H__
#include "../reader/reader.h"
#include <list>
class fontHead
{
private:
uint16_t verMain;
uint16_t verSub;
uint16_t tableCount;
std::list<uint16_t> args;
public:
fontHead(/* args */){
verMain = 0;
verSub = 0;
tableCount = 0;
args = {};
};
~fontHead(){};
void read(reader*);
void display();
uint16_t getTableCount(){return tableCount;};
std::list<uint16_t> getArgs(){return args;};
};
#endif

View File

@ -0,0 +1,285 @@
#ifndef __TABLE_BASE_HEADER_H__
#define __TABLE_BASE_HEADER_H__
#include "../../../reader/reader.h"
class BaseHeader1
{
private:
uint16_t _majorVersion;
uint16_t _minorVersion;
Offset16 _horizAxisOffset;
Offset16 _vertAxisOffset;
public:
BaseHeader1():_majorVersion(1),_minorVersion(0),_horizAxisOffset(0),_vertAxisOffset(0){};
~BaseHeader1(){};
BaseHeader1(reader* rd){read(rd);};
void read(reader *rd){
if(_majorVersion!=1||_minorVersion!=0)return;
_majorVersion = rd->readUint16();
_minorVersion = rd->readUint16();
_horizAxisOffset = rd->readUint16();
_vertAxisOffset = rd->readUint16();
};
uint16_t majorVersion()const{return _majorVersion;};
uint16_t minorVersion()const{return _minorVersion;};
uint16_t horizAxisOffset()const{return _horizAxisOffset;};
uint16_t vertAxisOffset()const{return _vertAxisOffset;};
};
//
class BaseHeader1_1: public BaseHeader1
{
private:
uint32_t _itemVarStoreOffset;
public:
BaseHeader1_1():_itemVarStoreOffset(0){};
~BaseHeader1_1(){};
BaseHeader1_1(reader* rd):BaseHeader1(rd){read(rd);};
void read(reader* rd){
_itemVarStoreOffset = rd->readUint32();
}
uint32_t itemVarStoreOffset()const{return _itemVarStoreOffset;};
};
//
class AxisTable
{
private:
uint16_t _baseTagListOffset;
uint16_t _baseScriptListOffset;
public:
AxisTable():_baseScriptListOffset(0),_baseTagListOffset(0){};
~AxisTable(){};
AxisTable(reader* rd){read(rd);};
void read(reader* rd){
_baseTagListOffset = rd->readUint16();
_baseScriptListOffset = rd->readUint16();
}
uint16_t baseTagListOffset()const{return _baseTagListOffset;};
uint16_t baseScriptListOffset()const{return _baseScriptListOffset;};
};
class BaseTagList
{
private:
uint16_t _baseTagCount;
std::vector<Tag> _baselineTags;
public:
BaseTagList():_baseTagCount(0){};
~BaseTagList(){};
BaseTagList(reader*rd){read(rd);};
void read(reader *rd){
_baseTagCount = rd->readUint16();
for(auto i=0;i<_baseTagCount;i++){
Tag t = rd->readTag();
_baselineTags.push_back(t);
}
}
uint16 baseTagCount(){return _baseTagCount;};
std::vector<Tag> baselineTags(){return _baselineTags;};
};
class BaseScriptRecord
{
private:
Tag _baseScriptTag;
Offset16 _baseScriptOffset;
public:
BaseScriptRecord():_baseScriptOffset(0){};
~BaseScriptRecord(){};
BaseScriptRecord(reader*rd){read(rd);};
void read(reader* rd){
_baseScriptTag = rd->readTag();
_baseScriptOffset = rd->readOffset16();
};
};
class BaseScriptList
{
private:
uint16 _baseScriptCount;
std::vector<BaseScriptRecord> _baseScriptRecords;
public:
BaseScriptList():_baseScriptCount(0){};
~BaseScriptList(){};
BaseScriptList(reader *rd){read(rd);};
void read(reader *rd){
_baseScriptCount = rd->readUint16();
for(auto i = 0; i<_baseScriptCount; i++){
BaseScriptRecord bs(rd);
_baseScriptRecords.push_back(rd);
}
}
uint16 baseScriptCount(){return _baseScriptCount;};
std::vector<BaseScriptRecord> baseScriptRecords(){return _baseScriptRecords;};
};
class BaseValues
{
private:
uint16 _defaultBaselineIndex;
uint16 _baseCoordCount;
std::vector<Offset16> _baseCoordOffset;
public:
BaseValues():_defaultBaselineIndex(0),_baseCoordCount(0){};
~BaseValues(){};
BaseValues(reader*rd){read(rd);};
void read(reader*rd){
_defaultBaselineIndex = rd->readUint16();
_baseCoordCount = rd->readUint16();
for(auto i=0;i<_baseCoordCount; i++){
Offset16 f = rd->readOffset16();
_baseCoordOffset.push_back(f);
}
}
uint16 defaultBaselineIndex(){return _defaultBaselineIndex;};
uint16 baseCoordCount(){return _baseCoordCount;};
std::vector<Offset16> baseCoordOffset(){return _baseCoordOffset;};
};
class BaseLangSys
{
private:
Tag _baseLangSysTag;
Offset16 _minMaxOffset;
public:
BaseLangSys():_minMaxOffset(0){};
~BaseLangSys(){};
BaseLangSys(reader* rd){read(rd);};
void read(reader*rd){
_baseLangSysTag = rd->readTag();
_minMaxOffset = rd->readOffset16();
}
Tag baseLangSysTag(){return _baseLangSysTag;};
Offset16 minMaxOffset(){return _minMaxOffset;};
};
class BaseScript
{
private:
Offset16 _baseValuesOffset;
Offset16 _defaultMinMaxOffset;
uint16 _baseLangSysCount;
std::vector<BaseLangSys> _baseLangSysRecords;
public:
BaseScript():_baseLangSysCount(0),_defaultMinMaxOffset(0),_baseValuesOffset(0){};
~BaseScript(){};
BaseScript(reader* rd){read(rd);};
void read(reader* rd){
_baseValuesOffset = rd->readOffset16();
_defaultMinMaxOffset = rd->readOffset16();
_baseLangSysCount = rd->readUint16();
for(auto i = 0; i<_baseLangSysCount;i++){
BaseLangSys bls(rd);
_baseLangSysRecords.push_back(bls);
}
}
Offset16 baseValueOffset(){return _baseValuesOffset;};
Offset16 defaultMinMaxOffset(){return _defaultMinMaxOffset;};
uint16 baseLangSysCount(){return _baseLangSysCount;};
std::vector<BaseLangSys> baseLangSysRecords(){return _baseLangSysRecords;};
};
class MinMax
{
private:
Offset16 _minCoordOffset;
Offset16 _maxCoordOffset;
uint16 _featMinMaxCount;
std::vector<FeatMinMax> _featMinMaxRecords;
public:
MinMax():_minCoordOffset(0),_maxCoordOffset(0),_featMinMaxCount(0){};
~MinMax(){};
MinMax(reader *rd){read(rd);};
void read(reader *rd){
_minCoordOffset = rd->readOffset16();
_maxCoordOffset = rd->readOffset16();
_featMinMaxCount = rd->readUint16();
for(auto i=0; i<_featMinMaxCount;i++){
FeatMinMax fmm(rd);
_featMinMaxRecords.push_back(fmm);
}
}
Offset16 minCoordOffset(){return _minCoordOffset;};
Offset16 maxCoordOffset(){return _maxCoordOffset;};
uint16 featMinMaxCount(){return _featMinMaxCount;};
std::vector<FeatMinMax> featMinMaxRecords(){return _featMinMaxRecords;};
};
class FeatMinMax
{
private:
Tag _featureTag;
Offset16 _minCoordOffset;
Offset16 _maxCoordOffset;
public:
FeatMinMax():_minCoordOffset(0), _maxCoordOffset(0){};
~FeatMinMax(){};
FeatMinMax(reader*rd){read(rd);};
void read(reader*rd){
_featureTag = rd->readTag();
_minCoordOffset =rd->readOffset16();
_maxCoordOffset = rd->readOffset16();
}
Tag featureTag(){return _featureTag;};
Offset16 minCoordOffset(){return _minCoordOffset;}
Offset16 maxCoordOffset(){return _maxCoordOffset;}
};
class BaseCoord1
{
private:
uint16 _format;
int16 _coordinate;
public:
BaseCoord1():_format(0),_coordinate(0){};
~BaseCoord1(){};
BaseCoord1(reader*rd){read(rd);};
void read(reader*rd){
_format = rd->readUint16();
_coordinate = rd->readInt16();
}
uint16 format(){return _format;}
int16 cordinate(){return _coordinate;}
};
class BaseCoord2: public BaseCoord1
{
private:
uint16 _referenceGlyph;
uint16 _baseCoordPoint;
public:
BaseCoord2():_referenceGlyph(0),_baseCoordPoint(0){};
~BaseCoord2(){};
BaseCoord2(reader*rd):BaseCoord1(rd){read(rd);};
void read(reader* rd){
_referenceGlyph = rd->readUint16();
_baseCoordPoint = rd->readUint16();
}
uint16 referenceGlyph(){return _referenceGlyph;}
uint16 baseCoordPoint(){return _baseCoordPoint;}
};
class BaseCoord3 : public BaseCoord1
{
private:
Offset16 _deviceOffset;
public:
BaseCoord3():_deviceOffset(0){};
~BaseCoord3(){};
BaseCoord3(reader *rd):BaseCoord1(rd){read(rd);};
void read(reader *rd){
_deviceOffset = rd->readOffset16();
}
Offset16 deviceOffset(){return _deviceOffset;}
};
#endif

View File

@ -0,0 +1,70 @@
#include "cmap.h"
void cmap::read(reader *rd)
{
_header = CmapHeader(rd);
auto curr = rd->curr();
_tableFormat = rd->readUint16();
rd->seek(curr);
switch (_tableFormat)
{
case 0:
{
CmapTable0 t(rd);
_table = &t;
}
break;
case 2:
{
CmapTable2 t(rd);
_table = &t;
}
break;
case 4:
{
CmapTable4 t(rd);
_table = &t;
}
break;
case 6:
{
CmapTable6 t(rd);
_table = &t;
}
break;
case 8:
{
CmapTable8 t(rd);
_table = &t;
}
break;
case 10:
{
CmapTable10 t(rd);
_table = &t;
}
break;
case 12:
{
CmapTable12 t(rd);
_table = &t;
}
break;
case 13:
{
CmapTable13 t(rd);
_table = &t;
}
break;
case 14:
{
CmapTable14 t(rd);
_table = &t;
}
break;
default:
_table = nullptr;
break;
}
}

View File

@ -0,0 +1,25 @@
#ifndef __TABLE_CMAP_H__
#define __TABLE_CMAP_H__
#include "../../../reader/reader.h"
#include "tables.h"
#include "header.h"
class CmapTable
{
private:
CmapHeader _header;
uint16_t _tableFormat;
CmapTableBase *_table;
public:
CmapTable():_tableFormat(0),_table(nullptr){};
~CmapTable(){};
CmapTable(reader* rd){read(rd);};
void read(reader*);
uint16_t tableFormat()const{return _tableFormat;}
CmapTableBase* table()const{return _table;}
CmapHeader header()const{return _header;}
};
#endif

View File

@ -0,0 +1,11 @@
#include "encoding_record.h"
void CmapEncodingRecord::read(reader* rd){
_platformId = rd->readUint16();
_encodingId = rd->readUint16();
_tableOffset = rd->readUint32();
}
CmapEncodingRecord::CmapEncodingRecord(reader* rd){
read(rd);
}

View File

@ -0,0 +1,22 @@
#ifndef __ENCODING_RECORD_H__
#define __ENCODING_RECORD_H__
#include <cstdint>
#include "../../../reader/reader.h"
class CmapEncodingRecord
{
private:
uint16_t _platformId;
uint16_t _encodingId;
uint32_t _tableOffset;
public:
CmapEncodingRecord():_platformId(0),_encodingId(0),_tableOffset(0){};
~CmapEncodingRecord(){};
CmapEncodingRecord(reader*);
void read(reader*);
uint16_t platformId(){return _platformId;};
uint16_t encodingId(){return _encodingId;};
uint32_t tableOffset(){return _tableOffset;};
};
#endif

View File

@ -0,0 +1,14 @@
#include "header.h"
void CmapHeader::read(reader* rd){
_version = rd->readUint16();
_numTables = rd->readUint16();
for(auto i = 0; i<_numTables; i++){
CmapEncodingRecord cer(rd);
_recordTables.push_back(cer);
}
}
CmapHeader::CmapHeader(reader* rd){
read(rd);
}

View File

@ -0,0 +1,24 @@
#ifndef __CMAP_HEADER_H__
#define __CMAP_HEADER_H__
#include <cstdint>
#include "encoding_record.h"
#include <list>
class CmapHeader
{
private:
uint16_t _version;
uint16_t _numTables;
std::list<CmapEncodingRecord> _recordTables;
public:
CmapHeader():_version(0),_numTables(0), _recordTables(){};
CmapHeader(reader*);
~CmapHeader(){};
void read(reader*);
uint16_t version(){return _version;};
uint16_t numberTables(){return _numTables;};
std::list<CmapEncodingRecord> recordTables(){return _recordTables;};
};
#endif

View File

@ -0,0 +1,54 @@
#ifndef __CMAP_PLATFORM_H__
#define __CMAP_PLATFORM_H__
enum platformIds
{
Unicode,
Macintosh,
ISO, // deprecated
Windows,
Custom
};
enum EncodingPlatformUnicode
{
Unicode1_0, // deprecated
Unicode1_1, // deprecated
ISO_10646, // deprecated
Unicode2_0_BMP,
Unicode2_0_Full,
Unicode_Variation_Sequences, // for table 14
Unicode_Full, // for table 13
};
enum EncodingMacintosh
{
};
enum EncodingISO
{
ASCII_7Bit,
ISO_10646,
ISO_8859_1,
};
enum EncodingWindows
{
Symbol,
Unicode_BMP,
ShiftJIS,
PRC,
Big5,
Wansung,
Johab,
Reserved,
Reserved,
Reserved,
Unicode_Full,
};
enum EncodingCustom
{
};
#endif

View File

@ -0,0 +1,502 @@
#ifndef __CMAP_TABLES_H__
#define __CMAP_TABLES_H__
#include <cstdint>
#include "../../../reader/reader.h"
#include <vector>
#include <math.h>
#include "../../../types/types.h"
#define list_uint16 std::vector<uint16_t>
#define list_uint8 std::vector<uint8_t>
#define list_int16 std::vector<int16_t>
class CmapTableBase
{
private:
uint16_t _format;
uint16_t _length;
uint16_t _language;
uint16_t _reserved;
public:
CmapTableBase() : _format(0), _length(0), _language(0), _reserved(0) {};
~CmapTableBase() {};
CmapTableBase(reader *rd) { read(rd); };
void read(reader *rd)
{
_format = rd->readUint16();
_reserved = 0;
if (_format == 8 || _format == 10 || _format == 12 || _format == 13)
_reserved = rd->readUint16();
_length = rd->readUint16();
if (_format == 14)
{
return;
}
_language = rd->readUint16();
};
uint16_t format() const { return _format; };
uint16_t length() const { return _length; };
uint16_t language() const { return _language; };
virtual uint16 Format() = 0;
};
class CmapTable0 : public CmapTableBase
{
private:
list_uint8 _glyphldArray;
uint16_t _glyphldCount;
public:
CmapTable0() : CmapTableBase(), _glyphldCount(256) {};
~CmapTable0() {};
CmapTable0(reader *rd) : CmapTableBase(rd), _glyphldCount(256) { read(rd); };
void read(reader *rd)
{
if (format() != 0)
return;
for (auto i = 0; i < _glyphldCount; i++)
{
uint8_t glyph = rd->readUint8();
_glyphldArray.push_back(glyph);
}
};
list_uint8 glyphldArray() const { return _glyphldArray; };
uint16 Format()override{return format();}
};
class CmapTable2SubHeader
{
private:
uint16_t _firstCode;
uint16_t _entryCount;
uint16_t _idDelta;
uint16_t _idRangeOffset;
public:
CmapTable2SubHeader() : _firstCode(0), _entryCount(0), _idDelta(0), _idRangeOffset(0) {};
~CmapTable2SubHeader() {};
CmapTable2SubHeader(reader *rd) { read(rd); };
void read(reader *rd)
{
_firstCode = rd->readUint16();
_entryCount = rd->readUint16();
_idDelta = rd->readUint16();
_idRangeOffset = rd->readUint16();
};
uint16_t firstCode() const { return _firstCode; };
uint16_t entryCount() const { return _entryCount; };
uint16_t idDelta() const { return _idDelta; };
uint16_t idRangeOffset() const { return _idRangeOffset; };
};
// 不常用
class CmapTable2 : public CmapTableBase
{
private:
list_uint16 _subHeaderKey;
std::vector<CmapTable2SubHeader> _subHeader;
list_uint16 _glyphldArray;
uint16_t _searchHeaderKeyCount;
public:
CmapTable2() : _searchHeaderKeyCount(256) {};
~CmapTable2() {};
CmapTable2(reader *rd) : CmapTableBase(rd), _searchHeaderKeyCount(256) { read(rd); };
void read(reader *rd)
{
if (format() != 2)
return;
}; // 计算很复杂
list_uint16 subHeaderKey() const { return _subHeaderKey; };
std::vector<CmapTable2SubHeader> subHeader() { return _subHeader; };
list_uint16 glyphldArray() const { return _glyphldArray; };
uint16 Format()override{return format();}
};
class CmapTable4 : public CmapTableBase
{
private:
uint16_t _segCountX2;
uint16_t _segCount;
uint16_t _searchRange;
uint16_t _entrySelector;
uint16_t _rangeShift;
list_uint16 _endCode;
uint16_t _reservedPad;
list_uint16 _startCode;
list_int16 _idDelta;
list_uint16 _idRangeOffset;
list_uint16 _glyphldArray;
void _calculate()
{
_segCount = _segCountX2 / 2;
_entrySelector = _segCount < 0 ? 0 : static_cast<uint16_t>(std::floor(std::log2(_segCount)));
_searchRange = static_cast<uint16_t>(std::pow(2, _entrySelector + 1));
_rangeShift = _segCountX2 - _searchRange;
return;
};
public:
CmapTable4() : _segCountX2(0), _searchRange(0), _entrySelector(0), _rangeShift(0), _reservedPad(0) {};
~CmapTable4() {};
CmapTable4(reader *rd) : CmapTableBase(rd) { read(rd); };
void read(reader *rd)
{
if (format() != 4)
return;
_segCountX2 = rd->readUint16();
_searchRange = rd->readUint16();
_entrySelector = rd->readUint16();
_rangeShift = rd->readUint16();
_calculate(); // 计算代替读取
for (auto i = 0; i < _segCount; i++)
{
uint16_t code = rd->readUint16();
_endCode.push_back(code);
}
_reservedPad = rd->readUint16();
for (auto i = 0; i < _segCount; i++)
{
uint16_t code = rd->readUint16();
_startCode.push_back(code);
}
for (auto i = 0; i < _segCount; i++)
{
int16_t code = rd->readUint16();
_idDelta.push_back(code);
}
for (auto i = 0; i < _segCount; i++)
{
uint16_t code = rd->readUint16();
_idRangeOffset.push_back(code);
}
while (rd->curr() < rd->getLength())
{
uint16_t glyph = rd->readUint16();
_glyphldArray.push_back(glyph);
}
};
uint16_t segCountX2() const { return _segCountX2; };
uint16_t segCount() const { return _segCount; };
uint16_t searchRange() const { return _searchRange; };
uint16_t entrySelector() const { return _entrySelector; };
uint16_t rangeShift() const { return _rangeShift; };
list_uint16 startCode() const { return _startCode; };
list_uint16 endCode() const { return _endCode; };
uint16_t reservePad() const { return _reservedPad; };
list_int16 idDelta() const { return _idDelta; };
list_uint16 idRangeOffset() const { return _idRangeOffset; };
list_uint16 glyphldArray() const { return _glyphldArray; };
uint16_t glyphId(uint16_t c, int i) const { return *(_idRangeOffset[i] / 2 + (c - _startCode[i]) + &_idRangeOffset[i]); };
uint16 Format()override{return format();}
};
class CmapTable6 : public CmapTableBase
{
private:
uint16_t _firstCode;
uint16_t _entryCount;
list_uint16 _glyphldArray;
public:
CmapTable6() : _firstCode(0), _entryCount(0) {};
~CmapTable6() {};
CmapTable6(reader *rd) : CmapTableBase(rd) { read(rd); };
void read(reader *rd)
{
if (format() != 6)
return;
_firstCode = rd->readUint16();
_entryCount = rd->readUint16();
for (auto i = 0; i < _entryCount; i++)
{
uint16_t glyph = rd->readUint16();
_glyphldArray.push_back(glyph);
}
};
uint16_t firstCode() const { return _firstCode; };
uint16_t entryCount() const { return _entryCount; };
list_uint16 glyphldArray() const { return _glyphldArray; };
uint16 Format()override{return format();}
};
//
class MapGroup
{
private:
uint32_t _startCharCode;
uint32_t _endCharCode;
uint32_t _startGlyphId;
public:
MapGroup() : _startCharCode(0), _endCharCode(0), _startGlyphId(0) {};
~MapGroup() {};
MapGroup(reader *rd) { read(rd); };
void read(reader *rd)
{
_startCharCode = rd->readUint32();
_endCharCode = rd->readUint32();
_startGlyphId = rd->readUint32();
};
uint32_t startCharCode() const { return _startCharCode; };
uint32_t endCharCode() const { return _endCharCode; };
uint32_t startGlyphId() const { return _startGlyphId; };
};
class CmapTable8 : public CmapTableBase
{
private:
list_uint8 _is32;
uint16_t _is32Count;
uint32_t _numGroups;
std::vector<MapGroup> _groups;
public:
CmapTable8() : _is32Count(8192), _numGroups(0) {};
~CmapTable8() {};
CmapTable8(reader *rd) : CmapTableBase(rd) { read(rd); };
void read(reader *rd)
{
if (format() != 8)
return;
for (auto i = 0; i < _is32Count; i++)
{
uint8_t u = rd->readUint8();
_is32.push_back(u);
}
_numGroups = rd->readUint32();
for (auto i = 0; i < _numGroups; i++)
{
MapGroup mg(rd);
_groups.push_back(mg);
}
};
list_uint8 is32() const { return _is32; };
uint16_t numGroups() const { return _numGroups; };
std::vector<MapGroup> groups() const { return _groups; };
uint16 Format()override{return format();}
};
//
class CmapTable10 : public CmapTableBase
{
private:
uint32_t _startCharCode;
uint32_t _numChars;
list_uint16 _glyphldArray;
public:
CmapTable10() : _startCharCode(0), _numChars(0) {};
~CmapTable10() {};
CmapTable10(reader *rd) : CmapTableBase(rd) { read(rd); };
void read(reader *rd)
{
if (format() != 10)
return;
_startCharCode = rd->readUint32();
_numChars = rd->readUint32();
while (rd->curr() < rd->getLength())
{
uint16_t glyph = rd->readUint16();
_glyphldArray.push_back(glyph);
}
};
uint32_t startCharCode() const { return _startCharCode; };
uint32_t numChars() const { return _numChars; };
list_uint16 glyphldArray() const { return _glyphldArray; };
uint16 Format()override{return format();}
};
//
class CmapTable12 : public CmapTableBase
{
private:
uint32_t _numGroups;
std::vector<MapGroup> _groups;
public:
CmapTable12() : _numGroups(0) {};
~CmapTable12() {};
CmapTable12(reader *rd) : CmapTableBase(rd) { read(rd); };
void read(reader *rd)
{
if (format() != 12)
return;
_numGroups = rd->readUint32();
for (auto i = 0; i < _numGroups; i++)
{
MapGroup mg(rd);
_groups.push_back(mg);
}
};
uint16_t numGroups() const { return _numGroups; };
std::vector<MapGroup> groups() const { return _groups; };
uint16 Format()override{return format();}
};
//
class CmapTable13 : public CmapTableBase
{
private:
uint32_t _numGroups;
std::vector<MapGroup> _groups;
public:
CmapTable13() : _numGroups(0) {};
~CmapTable13() {};
CmapTable13(reader *rd) : CmapTableBase(rd) { read(rd); };
void read(reader *rd)
{
if (format() != 13)
return;
_numGroups = rd->readUint32();
for (auto i = 0; i < _numGroups; i++)
{
MapGroup mg(rd);
_groups.push_back(mg);
}
};
uint16_t numGroups() const { return _numGroups; };
std::vector<MapGroup> groups() const { return _groups; };
uint16 Format()override{return format();}
};
//
class VariationSelector
{
private:
uint24 _varSelector; // read 24 bit
uint16_t _defualtUVSOffset;
uint16_t _nonDefaultUVSOffset;
public:
VariationSelector() : _varSelector(0), _defualtUVSOffset(0), _nonDefaultUVSOffset(0) {};
~VariationSelector() {};
VariationSelector(reader *rd) { read(rd); };
void read(reader *rd)
{
_varSelector = rd->readUint24();
_defualtUVSOffset = rd->readUint16();
_nonDefaultUVSOffset = rd->readUint16();
};
uint32_t varSelector() const { return _varSelector; };
uint16_t defaultUVSOffset() const { return _defualtUVSOffset; };
uint16_t nonDefaultUVSOffset() const { return _nonDefaultUVSOffset; };
};
//
class CmapTable14 : public CmapTableBase
{
private:
uint32_t _numVarSelectorRecords;
std::vector<VariationSelector> _varSelector;
public:
CmapTable14() : _numVarSelectorRecords(0) {};
~CmapTable14() {};
CmapTable14(reader *rd) : CmapTableBase(rd) { read(rd); };
void read(reader *rd)
{
if (format() != 14)
return;
_numVarSelectorRecords = rd->readUint32();
for (auto i = 0; i < _numVarSelectorRecords; i++)
{
VariationSelector vs(rd);
_varSelector.push_back(vs);
}
};
uint32_t numVarSelectorRecords() const { return _numVarSelectorRecords; };
std::vector<VariationSelector> varSelector() const { return _varSelector; };
uint16 Format()override{return format();}
};
// default uvs table
class UnicodeRange
{
private:
uint24 _startUnicodeValue;
uint8_t _additionalCount;
public:
UnicodeRange() : _startUnicodeValue(0), _additionalCount(0) {};
~UnicodeRange() {};
UnicodeRange(reader *rd) { read(rd); };
void read(reader *rd)
{
_startUnicodeValue = rd->readUint24();
_additionalCount = rd->readUint8();
};
uint32_t startUnicodeValue() const { return _startUnicodeValue; };
uint8_t additionalCount() const { return _additionalCount; };
};
class DefaultUVS
{
private:
uint32_t _numUnicodeValueRanges;
std::vector<UnicodeRange> _ranges;
public:
DefaultUVS() : _numUnicodeValueRanges(0) {};
~DefaultUVS() {};
DefaultUVS(reader *rd) { read(rd); };
void read(reader *rd)
{
_numUnicodeValueRanges = rd->readInt32();
for (auto i = 0; i < _numUnicodeValueRanges; i++)
{
UnicodeRange ur(rd);
_ranges.push_back(ur);
}
};
uint32_t numUnicodeValueRanges() const { return _numUnicodeValueRanges; };
std::vector<UnicodeRange> range() const { return _ranges; };
};
// non-default uvs table
class UVSMapping
{
private:
uint24 _unicodeValue;
uint16_t _glyphId;
public:
UVSMapping() : _unicodeValue(0), _glyphId(0) {};
~UVSMapping() {};
UVSMapping(reader *rd) { read(rd); };
void read(reader *rd)
{
_unicodeValue = rd->readUint24();
_glyphId = rd->readUint16();
};
uint32_t unicodeValue() const { return _unicodeValue; };
uint16_t glyphId() const { return _glyphId; };
};
class NonDefaultUVS
{
private:
uint32_t _numUVSMappings;
std::vector<UVSMapping> _uvsMappings;
public:
NonDefaultUVS() : _numUVSMappings(0) {};
~NonDefaultUVS() {};
NonDefaultUVS(reader *rd) { read(rd); };
void read(reader *rd)
{
_numUVSMappings = rd->readUint32();
for (auto i = 0; i < _numUVSMappings; i++)
{
UVSMapping um(rd);
_uvsMappings.push_back(um);
}
};
uint32_t numUVSMappings() const { return _numUVSMappings; };
std::vector<UVSMapping> uvsMappings() const { return _uvsMappings; };
};
#endif

View File

@ -0,0 +1,85 @@
#ifndef __GLYF_H__
#define __GLYF_H__
#include "../../../reader/reader.h"
#define ON_CURVE_POINT 0x01
#define X_SHORT_VECTOR 0x02
#define Y_SHORT_VECTOR 0x04
#define REPEAT_FLAG 0x08
#define X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR 0x10
#define Y_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR 0x20
#define OVERLAP_SIMPLE 0x40
#define FLAG_Reserved 0x80
#define list_uint8 std::vector<uint8_t>
#define list_uint16 std::vector<uint16_t>
/*
header
*/
class GlyfTableHeader
{
private:
int16_t _numberOfContours; //非负数表示简单字形,负数表示复合字形
int16_t _xMin;
int16_t _yMin;
int16_t _xMax;
int16_t _yMax;
public:
GlyfTableHeader():_numberOfContours(0),_xMax(0),_yMax(0),_xMin(0),_yMin(0){};
~GlyfTableHeader(){};
GlyfTableHeader(reader* rd){read(rd);};
void read(reader*rd){
_numberOfContours = rd->readInt16();
_xMin = rd->readInt16();
_yMin = rd->readInt16();
_xMax = rd->readInt16();
_yMax = rd->readInt16();
}
int16_t numberOfContours(){return _numberOfContours;};
int16_t xMin(){return _xMin;};
int16_t yMin()const{return _yMin;};
int16_t xMax()const{return _xMax;};
int16_t yMax()const{return _yMax;};
};
//
class SimpleGlyfTable
{
private:
uint16_t _numOfContours;
list_uint16 _endPtsOfContours;
uint16_t _instructionLength;
list_uint8 _instructions;
list_uint8 _flags;
list_uint16 _xCoordinates;
list_uint16 _yCoordinates;
public:
SimpleGlyfTable() : _instructionLength(0), _numOfContours(0) {};
~SimpleGlyfTable() {};
SimpleGlyfTable(uint16_t numOfContours, reader *rd)
{
_numOfContours = numOfContours;
read(rd);
};
void read(reader *rd)
{
for (auto i = 0; i < _numOfContours; i++)
{
uint16_t n = rd->readUint16();
_endPtsOfContours.push_back(n);
}
_instructionLength = rd->readUint16();
for (auto i = 0; i < _instructionLength; i++)
{
uint8_t n = rd->readUint8();
_instructions.push_back(n);
}
};
list_uint16 endPtsOfContours() { return _endPtsOfContours; };
uint16_t instructionLength() { return _instructionLength; };
list_uint8 instructions() { return _instructions; };
list_uint8 flags() { return _flags; };
list_uint16 xCoordinates() { return _xCoordinates; };
list_uint16 yCoordinates() { return _yCoordinates; };
};
#endif

View File

@ -0,0 +1,90 @@
#ifndef __TABLE_HEAD_H__
#define __TABLE_HEAD_H__
#include "../../../reader/reader.h"
class HeadTable
{
private:
uint16 _majorVersion;
uint16 _minorVersion;
Fixed _fontRevision;
uint32 _checksumAdjustment;
uint32 _magicNumber;
uint16 _flags;
uint16 _unitsPerEm;
LONGDATETIME _created;
LONGDATETIME _modified;
int16 _xMin;
int16 _yMin;
int16 _xMax;
int16 _yMax;
uint16 _maxStyle;
uint16 _lowestRecPPEM;
int16 _fontDirectHint;
int16 _indexToLocFormat;
int16 _glyphDataFormat;
public:
HeadTable() : _majorVersion(0),
_minorVersion(0),
_fontRevision(),
_checksumAdjustment(0),
_magicNumber(0),
_flags(0),
_unitsPerEm(0),
_created(0),
_modified(0),
_xMin(0),
_yMin(0),
_xMax(0),
_yMax(0),
_maxStyle(0),
_lowestRecPPEM(0),
_fontDirectHint(0),
_indexToLocFormat(0),
_glyphDataFormat(0) {};
~HeadTable() {};
HeadTable(reader *rd) { read(rd); }
void read(reader *rd)
{
_majorVersion = rd->readUint16();
_minorVersion = rd->readUint16();
_fontRevision = rd->readFixed();
_checksumAdjustment = rd->readUint32();
_magicNumber = rd->readUint32();
_flags = rd->readUint16();
_unitsPerEm = rd->readUint16();
_created = rd->readUint64();
_modified = rd->readUint64();
_xMin = rd->readInt16();
_yMin = rd->readInt16();
_xMax = rd->readInt16();
_yMax = rd->readInt16();
_maxStyle = rd->readUint16();
_lowestRecPPEM = rd->readUint16();
_fontDirectHint = rd->readInt16();
_indexToLocFormat = rd->readInt16();
_glyphDataFormat = rd->readInt16();
}
uint16 majorVersion() { return _majorVersion; }
uint16 minorVersion() { return _minorVersion; }
Fixed fontRevision() { return _fontRevision; }
uint32 checksumAdjustment() { return _checksumAdjustment; }
uint32 magicNumber() { return _magicNumber; }
uint16 flags() { return _flags; }
uint16 unitsPerEm() { return _unitsPerEm; }
LONGDATETIME created() { return _created; }
LONGDATETIME modified() { return _modified; }
int16 xMin() { return _xMin; }
int16 yMin() { return _yMin; }
int16 xMax() { return _xMax; }
int16 yMax() { return _yMax; }
uint16 maxStyle() { return _maxStyle; }
uint16 lowestRecPPEM() { return _lowestRecPPEM; }
int16 fontDirectHint() { return _fontDirectHint; }
int16 indexToLocFormat() { return _indexToLocFormat; }
int16 glyphDataFormat() { return _glyphDataFormat; }
};
#endif

View File

@ -0,0 +1,60 @@
#ifndef __TABLE_LOCA_H__
#define __TABLE_LOCA_H__
#include "../../../reader/reader.h"
#define LocaShortFormat 0
#define LocaLongFormat 1
class LocaTable
{
private:
uint16 _numGlyphs;
public:
LocaTable():_numGlyphs(0){};
~LocaTable(){};
LocaTable(uint16 i):_numGlyphs(i){}
uint16 numGlyphs(){return _numGlyphs;}
};
class LocaTableShort: public LocaTable
{
private:
uint16 _indexToLocFormat;
std::vector<Offset16> _offsets;
public:
LocaTableShort():_indexToLocFormat(LocaShortFormat){};
~LocaTableShort(){};
LocaTableShort(uint16 num):LocaTable(num),_indexToLocFormat(LocaShortFormat){}
LocaTableShort(uint16 num, reader *rd):LocaTable(num),_indexToLocFormat(LocaShortFormat){read(rd);}
void read(reader *rd){
for(auto i=0;i<numGlyphs();i++){
Offset16 o = rd->readOffset16();
_offsets.push_back(o);
}
}
uint16 format(){return _indexToLocFormat;}
std::vector<Offset16> offsets(){return _offsets;}
};
class LocaTableLong: public LocaTable
{
private:
uint16 _indexToLocFormat;
std::vector<Offset32> _offsets;
public:
LocaTableLong():_indexToLocFormat(LocaLongFormat){};
~LocaTableLong(){};
LocaTableLong(uint16 num):LocaTable(num),_indexToLocFormat(LocaLongFormat){}
LocaTableLong(uint16 num, reader *rd):LocaTable(num),_indexToLocFormat(LocaLongFormat){read(rd);}
void read(reader *rd){
for(auto i=0;i<numGlyphs();i++){
Offset32 o = rd->readOffset32();
_offsets.push_back(o);
}
}
uint16 format(){return _indexToLocFormat;}
std::vector<Offset32> offsets(){return _offsets;}
};
#endif

View File

@ -0,0 +1,84 @@
#ifndef __TABLE_MAXP_H__
#define __TABLE_MAXP_H__
#include "../../../reader/reader.h"
class MaxpTable
{
private:
Version16Dot16 _version;
uint16 _numGlyphs;
public:
MaxpTable() : _version(0x00005000), _numGlyphs(0) {};
~MaxpTable() {};
MaxpTable(uint32 n) : _version(n), _numGlyphs(0) {};
MaxpTable(reader *rd) { read(rd); }
void read(reader *rd)
{
_version = rd->readVersion16Dot16();
_numGlyphs = rd->readUint16();
}
Version16Dot16 version() { return _version; }
uint16 numGlyphs() { return _numGlyphs; }
};
#define MaxpTable0Dot5 MaxpTable
class MaxpTable1Dot0 : public MaxpTable
{
private:
uint16 _maxPoints;
uint16 _maxContours;
uint16 _maxCompositePoints;
uint16 _maxCompositeContours;
uint16 _maxZones;
uint16 _maxTwilightPoints;
uint16 _maxStorage;
uint16 _maxFunctionDefs;
uint16 _maxInstructionDefs;
uint16 _maxStackElements;
uint16 _maxSizeOfInstructions;
uint16 _maxComponentElemets;
uint16 _maxComponentDepth;
public:
MaxpTable1Dot0() : MaxpTable(0x00010000), _maxComponentDepth(0), _maxComponentElemets(0), _maxCompositeContours(0),
_maxCompositePoints(0), _maxContours(0), _maxFunctionDefs(0), _maxInstructionDefs(0),
_maxPoints(0), _maxSizeOfInstructions(0), _maxStackElements(0), _maxStorage(0),
_maxTwilightPoints(0), _maxZones(0) {};
~MaxpTable1Dot0() {};
MaxpTable1Dot0(reader *rd) { read(rd); }
void read(reader *rd)
{
MaxpTable::read(rd);
_maxPoints = rd->readUint16();
_maxContours = rd->readUint16();
_maxCompositePoints = rd->readUint16();
_maxCompositeContours = rd->readUint16();
_maxZones = rd->readUint16();
_maxTwilightPoints = rd->readUint16();
_maxStorage = rd->readUint16();
_maxFunctionDefs = rd->readUint16();
_maxInstructionDefs = rd->readUint16();
_maxStackElements = rd->readUint16();
_maxSizeOfInstructions = rd->readUint16();
_maxComponentElemets = rd->readUint16();
_maxComponentDepth = rd->readUint16();
}
uint16 maxPoints() { return _maxPoints; }
uint16 maxContours() { return _maxContours; }
uint16 maxCompositePoints() { return _maxCompositePoints; }
uint16 maxCompositeContours() { return _maxCompositeContours; }
uint16 maxZones() { return _maxZones; }
uint16 maxTwilightPoints() { return _maxTwilightPoints; }
uint16 maxStorage() { return _maxStorage; }
uint16 maxFunctionDefs() { return _maxFunctionDefs; }
uint16 maxInstructionDefs() { return _maxInstructionDefs; }
uint16 maxStackElements() { return _maxStackElements; }
uint16 maxSizeOfInstructions() { return _maxSizeOfInstructions; }
uint16 maxComponentElemets() { return _maxComponentElemets; }
uint16 maxComponentDepth() { return _maxComponentDepth; }
};
#endif

View File

@ -0,0 +1,58 @@
#include "name.h"
#include "../reader/buffer.h"
#include <iostream>
NameTable::NameTable(reader *rd, uint16_t length){
read(rd, length);
}
void NameTable::readHeader(reader* rd){
header.read(rd);
}
void NameTable::read(reader* rd, uint16_t length){
header.read(rd); //read header
for(auto i = 0; i<header.getRecordCount(); i++){
readRecord(rd);
}
if(!rd->seek(header.getStorageOffset())){
throw "file len too low";
}
auto len = length - header.getStorageOffset();
auto data = rd->readString(len);
buffer storageReader(data);
for(auto it : header.getNameRecords()){
readName(&storageReader, it);
}
}
void NameTable::readRecord(reader* rd){
nameRecord nr;
nr.platformId = rd->readUint16();
nr.encodingId = rd->readUint16();
nr.languageId = rd->readUint16();
nr.nameId = rd->readUint16();
nr.length = rd->readUint16();
nr.offset = rd->readUint16();
nr.display();
header.addNameRecord(nr);
}
void NameTable::readName(reader* rd, nameRecord nr){
if(!rd->seek(nr.offset)){
return;
}
std::string s = rd->readString(nr.length);
names[nr.nameId] = s;
}
void NameTable::display(){
std::cout<<"this is the name infomation of the font:"<<std::endl;
header.display();
for(auto it: names){
std::cout<<"id:"<<it.first<<"\tvalue:"<<it.second<<std::endl;
}
}

View File

@ -0,0 +1,30 @@
#ifndef __NAME_H__
#define __NAME_H__
#include <cstdint>
#include <list>
#include <string>
#include <map>
#include "../../../reader/reader.h"
#include "name_head.h"
class NameTable
{
private:
uint16_t offset;
uint16_t len;
nameTableHeader header;
std::map<int, std::string> names;
public:
NameTable():offset(0),len(0),header(),names({}){};
~NameTable() {};
NameTable(reader *, uint16_t);
void readHeader(reader*);
void read(reader *, uint16_t);
void readRecord(reader *);
void display();
void readName(reader*, nameRecord);
};
#endif

View File

@ -0,0 +1,40 @@
#include "name_head.h"
#include <iostream>
void nameTableHeader::display()
{
std::cout << "the header of name table:" << std::endl;
std::cout << "version:" << version << "\trecordsCount:" << recordsCount << "\tstorageOffset:" << storageOffset << std::endl;
std::cout<<"langTags: "<<langTagCount<<std::endl;
// for(auto it : nameRecords){
// it.display();
// }
}
void nameTableHeader::read(reader *rd)
{
version = rd->readUint16();
recordsCount = rd->readUint16();
storageOffset = rd->readUint16();
// read language tag
if (version == 1)
{
langTagCount = rd->readUint16();
for (auto i = 0; i < langTagCount; i++)
{
//
readLangTag(rd);
}
}
}
void nameTableHeader::readLangTag(reader *rd)
{
langTagRecord lt;
lt.length = rd->readUint16();
lt.offset = rd->readUint16();
langTagRecords.push_back(lt);
}
void nameTableHeader::addNameRecord(nameRecord nr){
nameRecords.push_back(nr);
}

View File

@ -0,0 +1,52 @@
#ifndef __NAME_HEAD_H__
#define __NAME_HEAD_H__
// 表格式, apple only support ver 0
#include <cstdint>
#include <list>
#include "../../../reader/reader.h"
#include <iostream>
// 名称记录
class nameRecord
{
public:
uint16_t platformId;
uint16_t encodingId;
uint16_t languageId;
uint16_t nameId;
uint16_t length;
uint16_t offset;
void display()
{
std::cout << "nameRecord: " << nameId <<" language: "<<languageId<< " len:" << length << " offset: " << offset << std::endl;
}
};
//
struct langTagRecord
{
uint16_t length;
uint16_t offset;
};
class nameTableHeader
{
private:
uint16_t version;
uint16_t recordsCount;
uint16_t storageOffset;
std::list<nameRecord> nameRecords;
uint16_t langTagCount; // only ver 1, apple not support
std::list<langTagRecord> langTagRecords; // only ver 1, apple not support
public:
nameTableHeader() : version(0), recordsCount(0), storageOffset(0), nameRecords(), langTagCount(0), langTagRecords() {};
~nameTableHeader() {};
void display();
uint16_t getVersion() { return version; };
uint16_t getRecordCount() { return recordsCount; };
uint16_t getStorageOffset() { return storageOffset; };
std::list<nameRecord> getNameRecords() { return nameRecords; };
void read(reader *);
void readLangTag(reader *rd);
void addNameRecord(nameRecord);
};
#endif

View File

@ -0,0 +1,28 @@
enum NameID {
Copyright,
FontFamily,
FontSubFamily,
UniqueFontID,
FullFontName,
Version,
PostScriptName,
Trademark,
ManufacturerName,
Designer,
Description,
VendorURL,
DesignerURL,
LicenseDescription,
LicenseInfoURL,
Reserved,
TypographicFamily,
TypographicSubFamily,
CompatibleFullName, //only macintosh
SampleText,
PostscriptCID,
WWSFamily,
WWSSubFamily,
LightBackgroundPallete,
DarkBackgroundPallete,
VariationScriptNamePrefix,
};

View File

@ -0,0 +1,49 @@
enum PlatformID {
Unicode,
Macintosh,
Reserved,
Microsoft,
};
enum UnicodePlatformSpecificID {
Version1dot0,
Version1dot1,
ISO10646,
Unicode2OnlyBMP,
Unicode2NoBMP
};
enum MacintoshPlatformSpecificID {
Roman,
Japanese,
TraditionalChinese,
Korean,
Arabic,
Hebrew,
Greek,
Russian,
RSymbol,
Devanagari,
Gurmukhi,
Gujarati,
Oriya,
Bengali,
Tamil,
Telugu,
Kannada,
Malayalam,
Sinhalese,
Burmese,
Thai,
Laotian,
Georgian,
Armenian,
SimplifiedChinese,
Tibetan,
Mongolian,
Geez,
Slavic,
Vietnamese,
Sindhi,
Uniterpreted,
};

View File

@ -0,0 +1,90 @@
#include "table.h"
#include "table_name.h"
#include "../reader/buffer.h"
#include <iostream>
void FontTable::display()
{
std::cout<<"table lists:"<<std::endl;
for(auto it : _tables){
std::cout<<"table "<<it.name<<" length:"<<it.length<<"\toffset:"<<it.offset<<"\tsum:"<<it.sum<<std::endl;
auto iter = tableNameMap.find(it.name);
if (iter == tableNameMap.end())
{
continue;
}
auto id = (*iter).second;
switch (id)
{
case name:
_name->display();
break;
default:
break;
}
}
}
void FontTable::read(reader *rd, uint16_t count)
{
for (auto i = 0; i < count; i++)
{
table t;
t.name = rd->readString(4);
t.sum = rd->readUint32();
t.offset = rd->readUint32();
t.length = rd->readUint32();
_tables.push_back(t);
}
//读取表详情
for (auto it: _tables)
{
auto iter = tableNameMap.find(it.name);
if (iter == tableNameMap.end())
{
continue;
}
auto id = (*iter).second;
switch (id)
{
case tableName::name:
{
if(!rd->seek(it.offset)){
throw "seek file failed";
};
auto data = rd->readString(it.length);
buffer nameReader(data);
_name = new NameTable();
_name->read(&nameReader, it.length);
}
break;
case tableName::cmap:
{
break;
}
case tableName::BASE:
{
break;
}
case tableName::head:
{
break;
}
case tableName::maxp:
{
break;
}
case tableName::glyf:
{
break;
}
default:
break;
}
}
}
std::vector<table> FontTable::tables(){
return _tables;
}

View File

@ -0,0 +1,65 @@
#ifndef __TABLE_H__
#define __TABLE_H__
#include "name/name.h"
#include "../../reader/reader.h"
#include <string>
#include "cmap/cmap.h"
#include "base/base.h"
#include "glyf/glyf.h"
#include "head/head.h"
#include "name/name.h"
#include "loca/loca.h"
#include "maxp/maxp.h"
struct table
{
std::string name;
uint32_t sum;
uint32_t offset;
uint32_t length;
};
class FontTable
{
private:
std::vector<table> _tables;
HeadTable* _head;
NameTable* _name;
BaseHeader1* _base;
CmapTable* _cmap;
MaxpTable* _maxp;
LocaTable* _loca;
public:
FontTable(){};
~FontTable(){
if(_head!=nullptr){
delete _head;
}
if(_name != nullptr){
delete _name;
}
if(_base != nullptr){
delete _base;
}
if(_cmap!= nullptr){
delete _cmap;
}
if(_maxp!=nullptr){
delete _maxp;
}
if(_loca!=nullptr){
delete _loca;
}
};
void display();
void read(reader*, uint16_t);
std::vector<table> tables();
};
#endif

View File

@ -0,0 +1,164 @@
#ifndef __TABLE_NAME_H__
#define __TABLE_NAME_H__
#include <map>
#include <string>
#define TABLE_NAME_OS2 = "OS/2"
#define TABLE_NAME_NAME = "name"
#define TABLE_NAME_AVAR = "avar"
#define TABLE_NAME_BASE = "BASE"
#define TABLE_NAME_CBDT = "CBDT"
#define TABLE_NAME_CBLC = "CBLC"
#define TABLE_NAME_CFF = "CFF"
#define TABLE_NAME_CFF2 = "CFF2"
#define TABLE_NAME_CMAP = "cmap"
#define TABLE_NAME_COLR = "COLR"
#define TABLE_NAME_CPAL = "CPAL"
#define TABLE_NAME_CVAR = "cvar"
#define TABLE_NAME_CVT = "cvt"
#define TABLE_NAME_DSIG = "DSIG"
#define TABLE_NAME_EBDT = "EBDT"
#define TABLE_NAME_EBLC = "EBLC"
#define TABLE_NAME_EBSC = "EBSC"
#define TABLE_NAME_FPGM = "fpgm"
#define TABLE_NAME_FVAR = "fvar"
#define TABLE_NAME_GASP = "gasp"
#define TABLE_NAME_GDEF = "GDEF"
#define TABLE_NAME_GLYF = "glyf"
#define TABLE_NAME_GPOS = "GPOS"
#define TABLE_NAME_GSUB = "GSUB"
#define TABLE_NAME_GVAR = "gvar"
#define TABLE_NAME_HDMX = "hdmx"
#define TABLE_NAME_HEAD = "head"
#define TABLE_NAME_HHEA = "hhea"
#define TABLE_NAME_HMTX = "hmtx"
#define TABLE_NAME_HVAR = "HVAR"
#define TABLE_NAME_JSTF = "JSTF"
#define TABLE_NAME_KERN = "kern"
#define TABLE_NAME_LOCA = "loca"
#define TABLE_NAME_LTSH = "LTSH"
#define TABLE_NAME_MATH = "MATH"
#define TABLE_NAME_MAXP = "maxp"
#define TABLE_NAME_MERG = "MERG"
#define TABLE_NAME_META = "meta"
#define TABLE_NAME_MVAR = "MVAR"
#define TABLE_NAME_PCLT = "PCLT"
#define TABLE_NAME_POST = "post"
#define TABLE_NAME_PREP = "prep"
#define TABLE_NAME_SBIX = "sbix"
#define TABLE_NAME_STAT = "STAT"
#define TABLE_NAME_SVG = "SVG"
#define TABLE_NAME_VDMX = "VDMX"
#define TABLE_NAME_VHEA = "vhea"
#define TABLE_NAME_VMTX = "vmtx"
#define TABLE_NAME_VORG = "VORG"
#define TABLE_NAME_VVAR = "VVAR"
enum tableName
{
os2,
name,
avar,
BASE,
CBDT,
CBLC,
CFF,
CFF2,
cmap,
COLR,
CPAL,
cvar,
cvt,
DSIG,
EBDT,
EBLC,
EBSC,
fpgm,
fvar,
gasp,
GDEF,
glyf,
GPOS,
GSUB,
gvar,
hdmx,
head,
hhea,
hmtx,
HVAR,
JSTF,
kern,
loca,
LTSH,
MATH,
maxp,
MERG,
meta,
MVAR,
PCLT,
post,
prep,
sbix,
STAT,
SVG,
VDMX,
vhea,
vmtx,
VORG,
VVAR,
};
const static std::map<std::string, tableName> tableNameMap = {
{"OS/2", os2},
{"name", name},
{"avar", avar},
{"BASE", BASE},
{"CBDT", CBDT},
{"CBLC", CBLC},
{"CFF", CFF},
{"CFF2", CFF2},
{"cmap", cmap},
{"COLR", COLR},
{"CPAL", CPAL},
{"cvar", cvar},
{"cvt", cvt},
{"DSIG", DSIG},
{"EBDT", EBDT},
{"EBLC", EBLC},
{"EBSC", EBSC},
{"fpgm", fpgm},
{"fvar", fvar},
{"gasp", gasp},
{"GDEF", GDEF},
{"glyf", glyf},
{"GPOS", GPOS},
{"GSUB", GSUB},
{"gvar", gvar},
{"hdmx", hdmx},
{"head", head},
{"hhea", hhea},
{"hmtx", hmtx},
{"HVAR", HVAR},
{"JSTF", JSTF},
{"kern", kern},
{"loca", loca},
{"LTSH", LTSH},
{"MATH", MATH},
{"maxp", maxp},
{"MERG", MERG},
{"meta", meta},
{"MVAR", MVAR},
{"PCLT", PCLT},
{"post", post},
{"prep", prep},
{"sbix", sbix},
{"STAT", STAT},
{"SVG", SVG},
{"VDMX", VDMX},
{"vhea", vhea},
{"vmtx", vmtx},
{"VORG", VORG},
{"VVAR", VVAR},
};
#endif

View File

@ -0,0 +1,173 @@
#ifndef __FONT_TYPES_H__
#define __FONT_TYPES_H__
#include <cstdint>
#include <list>
#include <vector>
#include <map>
#include <iostream>
#define uint8 uint8_t
#define uint16 uint16_t
#define uint32 uint32_t
#define int8 int8_t
#define int16 int16_t
#define int32 int32_t
#define FWORD int16_t
#define UFWORD uint16_t
#define LONGDATETIME uint64_t
#define Offset8 uint8_t
#define Offset16 uint16_t
#define Offset24 uint24_t
#define Offset32 uint32_t
#define uint24 uint24_t
#define int24 int24_t
class uint24_t
{
private:
uint32 _value;
public:
uint24_t() : _value(0) {};
~uint24_t() {};
explicit uint24_t(uint32 i) : _value(i & 0xFFFFFF) {};
operator uint32_t() const { return _value; };
public:
friend std::ostream &operator<<(std::ostream &os, const uint24_t &u)
{
return os << u._value;
};
friend std::istream &operator>>(std::istream &in, uint24_t &u)
{
uint8_t bytes[3];
in.read(reinterpret_cast<char *>(bytes), 3);
uint32_t ret = (static_cast<uint32_t>(bytes[2]) << 16) | (static_cast<uint32_t>(bytes[1]) << 8) | static_cast<uint32_t>(bytes[0]);
u._value = ret & 0xFFFFFF;
return in;
};
uint24_t operator+(const uint24_t &o) const
{
return uint24_t(_value + o._value);
}
uint24_t operator-(const uint24_t &o) const
{
return uint24_t(_value - o._value);
}
};
class int24_t
{
private:
int32 _value;
public:
int24_t() : _value(0) {};
~int24_t() {};
explicit int24_t(uint32 i) : _value(i & 0xFFFFFF) {};
operator int32_t() const { return _value; };
public:
friend std::ostream &operator<<(std::ostream &os, const int24_t &u)
{
return os << u._value;
};
friend std::istream &operator>>(std::istream &in, int24_t &u)
{
int8_t bytes[3];
in.read(reinterpret_cast<char *>(bytes), 3);
int32_t ret = (static_cast<int32_t>(bytes[2]) << 16) | (static_cast<int32_t>(bytes[1]) << 8) | static_cast<int32_t>(bytes[0]);
u._value = ret & 0xFFFFFF;
return in;
};
int24_t operator+(const int24_t &o) const
{
return int24_t(_value + o._value);
}
int24_t operator-(const int24_t &o) const
{
return int24_t(_value - o._value);
}
};
class Fixed
{
private:
int16 _num1;
int16 _num2;
public:
Fixed():_num1(0),_num2(0){};
~Fixed(){};
friend std::ostream &operator<<(std::ostream& out, const Fixed& f){
return out<<f._num1<<"."<<f._num2;
}
friend std::istream &operator>>(std::istream& in, Fixed& f){
return in>>f._num1>>f._num2;
}
};
// 16-bit signed fixed number with the low 14 bits of fraction (2.14).
class F2DOT14
{
private:
uint16 _value;
uint8 _integer;
uint16 _fraction;
public:
F2DOT14():_value(0){};
~F2DOT14(){};
friend std::ostream &operator<<(std::ostream& out, const F2DOT14& f){
return out<<f._integer<<"."<<f._fraction;
}
friend std::istream &operator>>(std::istream& in, F2DOT14& f){
in>>f._value;
f._integer = f._value >>14 ;
f._fraction = f._value<<2 ;
return in;
}
};
class Tag
{
private:
uint8 _byte1;
uint8 _byte2;
uint8 _byte3;
uint8 _byte4;
public:
Tag():_byte1(0),_byte2(0),_byte3(0), _byte4(0){};
~Tag(){};
friend std::ostream &operator<<(std::ostream& out, const Tag& t){
return out<<t._byte1<<t._byte2<<t._byte3<<t._byte4;
}
friend std::istream &operator>>(std::istream& in, Tag& t){
in>>t._byte1>>t._byte2>>t._byte3>>t._byte4;
return in;
}
};
class Version16Dot16
{
private:
uint16 _majorVersion;
uint16 _minorVersion;
public:
Version16Dot16():_majorVersion(0),_minorVersion(0){};
Version16Dot16(uint32 n):_majorVersion(n>>16 & 0xFFFF),_minorVersion(n<<16>>16 &0xFFFF){};
~Version16Dot16(){};
friend std::ostream &operator<<(std::ostream& out, const Version16Dot16& f){
return out<<f._majorVersion<<"."<<f._minorVersion;
}
friend std::istream &operator>>(std::istream& in, Version16Dot16& f){
in>>f._majorVersion>>f._minorVersion;
return in;
}
};
#endif

View File

@ -0,0 +1,14 @@
#ifndef __FONT_MATH_H__
#define __FONT_MATH_H__
#include <cstdint>
uint16_t highestBitValue(uint16_t x) {
if (x == 0) return 0;
uint16_t n = 0;
while (x > 1) {
x >>= 1;
n++;
}
return 1U << n;
}
#endif

13
cpp/fonts/main.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "reader/file.h"
#include "core/font.h"
int main(int argc, char const *argv[])
{
/* code */
const char* fontFile = "/home/kun1h/fonts/fzmw.ttf";
file rd(fontFile);
font font;
font.read(&rd);
font.display();
return 0;
}

View File

@ -0,0 +1,10 @@
set (SOURCE
reader.h
file.h
file.cpp
buffer.h
buffer.cpp
)
project(fonts)
add_library(reader SHARED ${SOURCE})

146
cpp/fonts/reader/buffer.cpp Normal file
View File

@ -0,0 +1,146 @@
#include "buffer.h"
#include <cstring>
#include <sstream>
#include "endian.h"
buffer::buffer(std::string data)
{
fp = std::stringstream(data);
length = data.length();
};
std::streamsize buffer::read(char *bytes, uint16_t l)
{
fp.read(reinterpret_cast<char *>(bytes), l);
std::streamsize bytesRead = fp.gcount();
return bytesRead;
};
int8_t buffer::readInt8()
{
int8_t ret = 0;
fp.read(reinterpret_cast<char*>(&ret), sizeof(ret));
return htobe16(ret);
}
int16_t buffer::readInt16()
{
int16_t ret = 0;
fp.read(reinterpret_cast<char*>(&ret), sizeof(ret));
return htobe16(ret);
};
int32_t buffer::readInt32()
{
int32_t ret = 0;
fp.read(reinterpret_cast<char*>(&ret), sizeof(ret));
return htobe16(ret);
}
int64_t buffer::readInt64()
{
uint64_t ret = 0;
fp.read(reinterpret_cast<char*>(&ret), sizeof(ret));
return htobe16(ret);
}
uint8_t buffer::readUint8()
{
uint8_t ret = 0;
fp.read(reinterpret_cast<char*>(&ret), sizeof(ret));
return ret;
}
uint16_t buffer::readUint16()
{
uint16_t ret = 0;
fp.read(reinterpret_cast<char*>(&ret), sizeof(ret));
return htobe16(ret);
};
uint24_t buffer::readUint24(){
uint24_t ret(0);
fp>>ret;
return ret;
}
uint32_t buffer::readUint32()
{
uint32_t ret = 0;
fp.read(reinterpret_cast<char*>(&ret), sizeof(ret));
return htobe32(ret);
}
uint64_t buffer::readUint64()
{
uint64_t ret = 0;
fp.read(reinterpret_cast<char*>(&ret), sizeof(ret));
return htobe64(ret);
}
std::string buffer::readString(int l)
{
char *data = new char[l];
fp.read(data, l);
std::streamsize bytesRead = fp.gcount();
auto ret = std::string(data, bytesRead);
delete[] data;
return ret;
}
FWORD buffer::readFWord(){
return readInt16();
}
UFWORD buffer::readUFWord(){
return readUint16();
}
Offset8 buffer::readOffset8(){
return readUint8();
}
Offset16 buffer::readOffset16(){
return readUint16();
}
Offset24 buffer::readOffset24(){
return readUint24();
}
Offset32 buffer::readOffset32(){
return readUint32();
}
int24_t buffer::readInt24(){
int24_t i;
fp>>i;
return i;
}
Fixed buffer::readFixed(){
Fixed f;
fp>>f;
return f;
}
F2DOT14 buffer::readF2Dot14(){
F2DOT14 f;
fp>>f;
return f;
}
Version16Dot16 buffer::readVersion16Dot16(){
Version16Dot16 v;
fp>>v;
return v;
}
Tag buffer::readTag(){
Tag t;
fp>>t;
return t;
}
bool buffer::seek(int64_t i)
{
if (i > length)
{
return false;
}
fp.seekg(i);
return true;
}
std::streampos buffer::curr()
{
return fp.tellg();
}

44
cpp/fonts/reader/buffer.h Normal file
View File

@ -0,0 +1,44 @@
#ifndef __READER_BUFFER_H__
#define __READER_BUFFER_H__
#include "reader.h"
#include <sstream>
class buffer : public reader
{
private:
std::stringstream fp;
std::streampos length;
public:
buffer(/* args */) : length(0) {};
~buffer() {};
buffer(std::string data);
std::streamsize read(char *, uint16_t) override;
int8_t readInt8() override;
int16_t readInt16() override;
int32_t readInt32() override;
int64_t readInt64() override;
uint8_t readUint8() override;
uint16_t readUint16() override;
uint32_t readUint32() override;
uint64_t readUint64() override;
std::string readString(int) override;
bool seek(int64_t) override;
std::streampos curr() override;
std::string getPath() override { return ""; };
std::streampos getLength() override { return length; };
uint24_t readUint24() override;
FWORD readFWord() override;
UFWORD readUFWord() override;
Offset8 readOffset8() override;
Offset16 readOffset16() override;
Offset24 readOffset24() override;
Offset32 readOffset32() override;
int24_t readInt24() override;
Fixed readFixed() override;
F2DOT14 readF2Dot14() override;
Version16Dot16 readVersion16Dot16() override;
Tag readTag() override;
};
#endif

174
cpp/fonts/reader/file.cpp Normal file
View File

@ -0,0 +1,174 @@
#include "file.h"
#include <cstring>
#include <sstream>
#include <endian.h>
file::file(const char *filePath) : reader()
{
fp.open(filePath, std::ios::binary);
if (!fp.is_open())
{
throw "file now open";
}
path = new char[std::strlen(filePath)];
std::memcpy(path, filePath, std::strlen(filePath));
fp.seekg(0, fp.end);
length = fp.tellg();
fp.seekg(0, fp.beg);
};
std::streamsize file::read(char *bytes, uint16_t l)
{
fp.read(bytes, l);
std::streamsize bytesRead = fp.gcount();
return bytesRead;
};
int8_t file::readInt8()
{
int8_t ret = 0;
fp.read(reinterpret_cast<char *>(&ret), sizeof(ret));
return htobe16(ret);
}
int16_t file::readInt16()
{
int16_t ret = 0;
fp.read(reinterpret_cast<char *>(&ret), sizeof(ret));
return htobe16(ret);
};
int32_t file::readInt32()
{
int32_t ret = 0;
fp.read(reinterpret_cast<char *>(&ret), sizeof(ret));
return htobe16(ret);
}
int64_t file::readInt64()
{
uint64_t ret = 0;
fp.read(reinterpret_cast<char *>(&ret), sizeof(ret));
return htobe16(ret);
}
uint8_t file::readUint8()
{
uint8_t ret = 0;
fp.read(reinterpret_cast<char *>(&ret), sizeof(ret));
return ret;
}
uint16_t file::readUint16()
{
uint16_t ret = 0;
fp.read(reinterpret_cast<char *>(&ret), sizeof(ret));
return htobe16(ret);
};
uint24_t file::readUint24()
{
uint24_t ret(0);
fp >> ret;
return ret;
}
uint32_t file::readUint32()
{
uint32_t ret = 0;
fp.read(reinterpret_cast<char *>(&ret), sizeof(ret));
return htobe32(ret);
}
uint64_t file::readUint64()
{
uint64_t ret = 0;
fp.read(reinterpret_cast<char *>(&ret), sizeof(ret));
return htobe64(ret);
}
std::string file::readString(int l)
{
char *data = new char[l];
fp.read(data, l);
std::streamsize bytesRead = fp.gcount();
auto ret = std::string(data, bytesRead);
delete[] data;
return ret;
}
FWORD file::readFWord(){
return readInt16();
}
UFWORD file::readUFWord(){
return readUint16();
}
Offset8 file::readOffset8(){
return readUint8();
}
Offset16 file::readOffset16(){
return readUint16();
}
Offset24 file::readOffset24(){
return readUint24();
}
Offset32 file::readOffset32(){
return readUint32();
}
int24_t file::readInt24(){
int24_t i;
fp>>i;
return i;
}
Fixed file::readFixed(){
Fixed f;
fp>>f;
return f;
}
F2DOT14 file::readF2Dot14(){
F2DOT14 f;
fp>>f;
return f;
}
Version16Dot16 file::readVersion16Dot16(){
Version16Dot16 v;
fp>>v;
return v;
}
Tag file::readTag(){
Tag t;
fp>>t;
return t;
}
bool file::seek(int64_t i)
{
if (i > length)
{
return false;
}
fp.seekg(i);
return true;
}
std::streampos file::curr()
{
return fp.tellg();
}
std::string file::getPath()
{
return path;
}
file::~file()
{
if (fp.is_open())
{
fp.close();
}
if (path != nullptr)
{
delete path;
}
}

45
cpp/fonts/reader/file.h Normal file
View File

@ -0,0 +1,45 @@
#ifndef __READER_FILE_H__
#define __READER_FILE_H__
#include "reader.h"
#include <fstream>
class file : public reader
{
private:
std::ifstream fp;
char *path;
std::streampos length;
public:
file() : path(nullptr), length(0), fp() {};
~file();
file(const char *filePath);
std::streamsize read(char *, uint16_t) override;
int8_t readInt8() override;
int16_t readInt16() override;
int32_t readInt32() override;
int64_t readInt64() override;
uint8_t readUint8() override;
uint16_t readUint16() override;
uint32_t readUint32() override;
uint64_t readUint64() override;
std::string readString(int) override;
bool seek(int64_t) override;
std::streampos curr() override;
std::string getPath() override;
std::streampos getLength() override { return length; };
uint24_t readUint24() override;
FWORD readFWord() override;
UFWORD readUFWord() override;
Offset8 readOffset8() override;
Offset16 readOffset16() override;
Offset24 readOffset24() override;
Offset32 readOffset32() override;
int24_t readInt24() override;
Fixed readFixed() override;
F2DOT14 readF2Dot14() override;
Version16Dot16 readVersion16Dot16() override;
Tag readTag() override;
};
#endif

41
cpp/fonts/reader/reader.h Normal file
View File

@ -0,0 +1,41 @@
#ifndef __READER_H__
#define __READER_H__
#include <fstream>
#include <string>
#include "../types/types.h"
class reader
{
private:
public:
reader(/* args */) {};
virtual ~reader() {};
virtual std::streamsize read(char *, uint16_t) = 0;
virtual int8_t readInt8() = 0;
virtual int16_t readInt16() = 0;
virtual int32_t readInt32() = 0;
virtual int64_t readInt64() = 0;
virtual uint8_t readUint8() = 0;
virtual uint16_t readUint16() = 0;
virtual uint32_t readUint32() = 0;
virtual uint64_t readUint64() = 0;
virtual std::string readString(int) = 0;
virtual bool seek(int64_t) = 0;
virtual std::streampos curr() = 0;
virtual std::string getPath() = 0;
virtual std::streampos getLength() = 0;
virtual uint24_t readUint24() = 0;
virtual Tag readTag() = 0;
virtual FWORD readFWord() = 0;
virtual UFWORD readUFWord() = 0;
virtual Offset8 readOffset8() = 0;
virtual Offset16 readOffset16() = 0;
virtual Offset24 readOffset24() = 0;
virtual Offset32 readOffset32() = 0;
virtual int24_t readInt24() = 0;
virtual Fixed readFixed() = 0;
virtual F2DOT14 readF2Dot14() = 0;
virtual Version16Dot16 readVersion16Dot16() = 0;
};
#endif

49
go.mod
View File

@ -1,12 +1,14 @@
module blog.bing89.com
go 1.17
go 1.21
require (
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible
github.com/bogem/id3v2/v2 v2.1.4
github.com/coreos/go-oidc/v3 v3.1.0
github.com/gin-gonic/gin v1.8.1
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/spf13/cobra v1.3.0
github.com/spf13/cobra v1.7.0
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
k8s.io/api v0.23.1
k8s.io/apimachinery v0.23.1
@ -17,41 +19,48 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.10.0 // indirect
github.com/goccy/go-json v0.9.7 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 // indirect
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

370
go.sum
View File

@ -18,15 +18,6 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=
cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM=
cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
@ -35,7 +26,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
@ -55,52 +45,25 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible h1:KXeJoM1wo9I/6xPTyt6qCxoSZnmASiAjlrr0dyTUKt8=
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bogem/id3v2/v2 v2.1.4 h1:CEwe+lS2p6dd9UZRlPc1zbFNIha2mb2qzT1cCEoNWoI=
github.com/bogem/id3v2/v2 v2.1.4/go.mod h1:l+gR8MZ6rc9ryPTPkX77smS5Me/36gxkMgDayZ9G1vY=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/coreos/go-oidc/v3 v3.1.0 h1:6avEvcdvTa1qYsOZ6I5PRkSYHzpTNWgKYmaJfaYbrRw=
github.com/coreos/go-oidc/v3 v3.1.0/go.mod h1:rEJ/idjfUyfkBit1eI1fvyr+64/g9dcKpAm8MJMesvo=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@ -113,22 +76,12 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws=
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
@ -138,18 +91,20 @@ github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE=
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
@ -158,11 +113,8 @@ github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/j
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0=
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/goccy/go-json v0.9.7 h1:IcB+Aqpx/iMHu5Yooh7jEzJk1JZ7Pjtmys2ukPr7EeM=
github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
@ -178,7 +130,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@ -195,12 +146,14 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@ -212,15 +165,15 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
@ -232,73 +185,35 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw=
github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY=
github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=
github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk=
github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@ -310,121 +225,70 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY=
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU=
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0=
github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM=
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
@ -433,9 +297,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
@ -443,23 +305,16 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@ -483,7 +338,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
@ -495,12 +349,10 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
@ -508,12 +360,10 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@ -538,11 +388,10 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -554,11 +403,7 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -572,36 +417,25 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -621,32 +455,25 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d h1:FjkYO/PPp4Wi0EAUOVLxePm7qVW4r4ctbWpURyuOD0E=
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -655,8 +482,10 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -675,7 +504,6 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@ -712,15 +540,11 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
@ -743,17 +567,6 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=
google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@ -785,7 +598,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
@ -803,29 +615,6 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@ -839,21 +628,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -867,9 +646,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@ -880,24 +658,22 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w=
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@ -914,20 +690,26 @@ k8s.io/client-go v0.23.1/go.mod h1:6QSI8fEuqD4zgFK0xbdwfB/PthBsIxCJMa3s17WlcO0=
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw=
k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4=
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk=
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 h1:pqRVJGQJz6oeZby8qmPKXYIBjyrcv7EHCe/33UkZMYA=
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961/go.mod h1:l8HTwL5fqnlns4jOveW1L75eo7R9KFHxiE0bsPGy428=
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU=
k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s=
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno=
sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=

68
go/double_ball/main.go Normal file
View File

@ -0,0 +1,68 @@
package main
import (
"flag"
"fmt"
"math/rand"
"sort"
"time"
)
const (
RedMax = 33
BlueMax = 16
)
func randRate(){
rand.Seed(time.Now().UnixNano())
rate := rand.Intn(100) + 1
fmt.Printf("\t (中奖概率%d%%)", rate)
}
func randBall(max int)int{
rand.Seed(time.Now().UnixNano())
return rand.Intn(max) + 1
}
func isIn(list []int, item int )bool{
for _, i := range list{
if i == item {
return true
}
}
return false
}
func randDoubleBall(){
balls := []int{}
for i := 0; i < 6;{
ball := randBall(RedMax)
if isIn(balls, ball) {
continue
}
i++
balls = append(balls, ball)
}
sort.Ints(balls)
blueball := randBall(BlueMax)
for _, ball := range balls {
fmt.Printf("\033[1;31;40m%d\033[0m \t", ball)
}
fmt.Printf("\033[1;34;40m%d\033[0m \t", blueball)
randRate()
fmt.Println("")
}
func main(){
var groups int
flag.IntVar(&groups, "g", 1, "注数")
flag.Parse()
if groups < 0 {
groups = 1
}
fmt.Printf("为您选取了 %d 注随机双色球,祝君中奖!\n", groups)
for i := 0; i < groups; i++ {
randDoubleBall()
}
}

7
go/fonts/font/font.go Normal file
View File

@ -0,0 +1,7 @@
package font
type Font struct{
Head Head `json:"head"`
}

10
go/fonts/font/head.go Normal file
View File

@ -0,0 +1,10 @@
package font
type Head struct {
Version string `json:"version"`
TableCount uint16 `json:"tableCount"`
Tables []Table `json:"tables"`
SearchRange uint16 `json:"searchRange"`
EntrySelector uint16 `json:"entrySelector"`
RangeShift uint16 `json:"rangeShift"`
}

170
go/fonts/font/reader.go Normal file
View File

@ -0,0 +1,170 @@
package font
import (
"bytes"
"encoding/binary"
"io"
"os"
)
type Reader interface {
Read([]byte) (int, error)
Close() error
ReadInt8() (int8, error)
ReadInt16() (int16, error)
ReadInt32() (int32, error)
ReadInt64() (int64, error)
ReadUint8() (uint8, error)
ReadUint16() (uint16, error)
ReadUint32() (uint32, error)
ReadUint64() (uint64, error)
ReadString(int) (string, error)
ReadBytes(int) ([]byte, error)
Seek(int64, int) (int64, error)
Size() (int64, error)
}
type reader struct {
path string
fp *os.File
}
func NewReader(file string) (Reader, error) {
fp, err := os.OpenFile(file, os.O_RDONLY, os.ModePerm)
if err != nil {
return nil, err
}
r := &reader{
fp: fp,
path: file,
}
return r, nil
}
func (r *reader) Read(p []byte) (int, error) {
if r.fp == nil {
return 0, nil
}
return r.fp.Read(p)
}
func (r *reader) Close() error {
if r.fp != nil {
return r.fp.Close()
}
return nil
}
func (r *reader) ReadCloser() io.ReadCloser {
return r
}
func (r *reader) ReadInt8() (int8, error) {
buff := make([]byte, 1)
_, err := r.fp.Read(buff)
if err != nil {
return 0, err
}
reader := bytes.NewReader(buff)
n := int8(0)
return n, binary.Read(reader, binary.LittleEndian, &n)
}
func (r *reader) ReadInt16() (int16, error) {
buff := make([]byte, 2)
_, err := r.fp.Read(buff)
if err != nil {
return 0, err
}
reader := bytes.NewReader(buff)
n := int16(0)
return n, binary.Read(reader, binary.LittleEndian, &n)
}
func (r *reader) ReadInt32() (int32, error) {
buff := make([]byte, 4)
_, err := r.fp.Read(buff)
if err != nil {
return 0, err
}
reader := bytes.NewReader(buff)
n := int32(0)
return n, binary.Read(reader, binary.LittleEndian, &n)
}
func (r *reader) ReadInt64() (int64, error) {
buff := make([]byte, 8)
_, err := r.fp.Read(buff)
if err != nil {
return 0, err
}
reader := bytes.NewReader(buff)
n := int64(0)
return n, binary.Read(reader, binary.LittleEndian, &n)
}
func (r *reader) ReadUint8() (uint8, error) {
buff := make([]byte, 1)
_, err := r.fp.Read(buff)
if err != nil {
return 0, err
}
return uint8(buff[0]), nil
}
func (r *reader) ReadUint16() (uint16, error) {
buff := make([]byte, 2)
_, err := r.fp.Read(buff)
if err != nil {
return 0, err
}
return binary.BigEndian.Uint16(buff), nil
}
func (r *reader) ReadUint32() (uint32, error) {
buff := make([]byte, 4)
_, err := r.fp.Read(buff)
if err != nil {
return 0, err
}
return binary.BigEndian.Uint32(buff), nil
}
func (r *reader) ReadUint64() (uint64, error) {
buff := make([]byte, 8)
_, err := r.fp.Read(buff)
if err != nil {
return 0, err
}
return binary.BigEndian.Uint64(buff), nil
}
func (r *reader) ReadString(len int) (string, error) {
buff := make([]byte, len)
_, err := r.fp.Read(buff)
if err != nil {
return "", err
}
return string(buff), nil
}
func (r *reader) ReadBytes(len int) ([]byte, error) {
buff := make([]byte, len)
_, err := r.fp.Read(buff)
if err != nil {
return []byte{}, err
}
return buff, nil
}
func (r *reader) Seek(offset int64, whence int) (int64, error) {
return r.fp.Seek(offset, whence)
}
func (r *reader) Size() (int64, error) {
fi, err := r.fp.Stat()
if err != nil {
return 0, err
}
return fi.Size(), nil
}

8
go/fonts/font/table.go Normal file
View File

@ -0,0 +1,8 @@
package font
type Table struct {
Name string `json:"name"`
Sum uint32 `json:"sum"`
Offset uint32 `json:"offset"`
Length uint32 `json:"length"`
}

111
go/fonts/font/table_name.go Normal file
View File

@ -0,0 +1,111 @@
package font
const (
PlatformIDUnicode = iota
PlatformIDMacintosh
PlatformIDReserved
PlatformIDMicrosoft
)
const (
UnicodePlatformSpecificIDVer1dot0 = iota
UnicodePlatformSpecificIDVer1dot1
UnicodePlatformSpecificIDISO10646
UnicodePlatformSpecificIDUnicode2OnlyBMP
UnicodePlatformSpecificIDUnicode2NoBMP
)
const (
MacintoshPlatformSpecificIDRoman = iota
MacintoshPlatformSpecificIDJapanese
MacintoshPlatformSpecificIDTraditionalChinese
MacintoshPlatformSpecificIDKorean
MacintoshPlatformSpecificIDArabic
MacintoshPlatformSpecificIDHebrew
MacintoshPlatformSpecificIDGreek
MacintoshPlatformSpecificIDRussian
MacintoshPlatformSpecificIDRSymbol
MacintoshPlatformSpecificIDDevanagari
MacintoshPlatformSpecificIDGurmukhi
MacintoshPlatformSpecificIDGujarati
MacintoshPlatformSpecificIDOriya
MacintoshPlatformSpecificIDBengali
MacintoshPlatformSpecificIDTamil
MacintoshPlatformSpecificIDTelugu
MacintoshPlatformSpecificIDKannada
MacintoshPlatformSpecificIDMalayalam
MacintoshPlatformSpecificIDSinhalese
MacintoshPlatformSpecificIDBurmese
MacintoshPlatformSpecificIDThai
MacintoshPlatformSpecificIDLaotian
MacintoshPlatformSpecificIDGeorgian
MacintoshPlatformSpecificIDArmenian
MacintoshPlatformSpecificIDSimplifiedChinese
MacintoshPlatformSpecificIDTibetan
MacintoshPlatformSpecificIDMongolian
MacintoshPlatformSpecificIDGeez
MacintoshPlatformSpecificIDSlavic
MacintoshPlatformSpecificIDVietnamese
MacintoshPlatformSpecificIDSindhi
MacintoshPlatformSpecificIDUniterpreted
)
const (
NameIDCopyright = iota
NameIDFontFamily
NameIDFontSubFamily
NameIDUniqueFontID
NameIDFullFontName
NameIDVersion
NameIDPostScriptName
NameIDTrademark
NameIDManufacturerName
NameIDDesigner
NameIDDescription
NameIDVendorURL
NameIDDesignerURL
NameIDLicenseDescription
NameIDLicenseInfoURL
NameIDReserved
NameIDTypographicFamily
NameIDTypographicSubFamily
NameIDCompatibleFullName //only mac
NameIDSampleText
NameIDPostscriptCID
NameIDWWSFamily
NameIDWWSSubFamily
NameIDLightBackgroundPallete
NameIDDarkBackgroundPallete
NameIDVariationScriptNamePrefix
)
type NameTable struct {
Name string `json:"name"`
CopyRight string `json:"copyRight"`
Family string `json:"family"`
Style string `json:"style"`
}
type NameRecord struct{
Platform uint16
PlatformSpecific uint16
Language uint16
Name uint16
Length uint16
Offset uint16
}
type LangTagRecord struct{
Length uint16
Offset uint16
}
type NameTableFormat struct{
Format uint16
RecordsCount uint16
StringOffset uint16
NameRecords []NameRecord
LangTagCount uint16 //only ver 1, apple not support
LangTagRecords []LangTagRecord //only ver 1, apple not support
}

217
go/fonts/main.go Normal file
View File

@ -0,0 +1,217 @@
package main
import (
"bytes"
"encoding/binary"
"fmt"
"os"
)
func readInt8(fp *os.File)(int8, error){
buff := make([]byte, 1)
_, err := fp.Read(buff)
if err != nil {
return 0, err
}
reader := bytes.NewReader(buff)
n := int8(0)
return n, binary.Read(reader, binary.LittleEndian, &n)
}
func readInt16(fp *os.File)(int16, error){
buff := make([]byte, 2)
_, err := fp.Read(buff)
if err != nil {
return 0, err
}
reader := bytes.NewReader(buff)
n := int16(0)
return n, binary.Read(reader, binary.LittleEndian, &n)
}
func readInt32(fp *os.File)(int32, error){
buff := make([]byte, 4)
_, err := fp.Read(buff)
if err != nil {
return 0, err
}
reader := bytes.NewReader(buff)
n := int32(0)
return n, binary.Read(reader, binary.LittleEndian, &n)
}
func readInt64(fp *os.File)(int64, error){
buff := make([]byte, 8)
_, err := fp.Read(buff)
if err != nil {
return 0, err
}
reader := bytes.NewReader(buff)
n := int64(0)
return n, binary.Read(reader, binary.LittleEndian, &n)
}
func readUint8(fp *os.File)(uint8, error){
buff := make([]byte, 1)
_, err := fp.Read(buff)
if err != nil {
return 0, err
}
return uint8(buff[0]), nil
}
func readUint16(fp *os.File)(uint16, error){
buff := make([]byte, 2)
_, err := fp.Read(buff)
if err != nil {
return 0, err
}
return binary.BigEndian.Uint16(buff), nil
}
func readUint32(fp *os.File)(uint32, error){
buff := make([]byte, 4)
_, err := fp.Read(buff)
if err != nil {
return 0, err
}
return binary.BigEndian.Uint32(buff), nil
}
func readUint64(fp *os.File)(uint64, error){
buff := make([]byte, 8)
_, err := fp.Read(buff)
if err != nil {
return 0, err
}
return binary.BigEndian.Uint64(buff), nil
}
func readString(fp *os.File, len int)(string, error){
buff := make([]byte, len)
_, err := fp.Read(buff)
if err != nil {
return "", err
}
return string(buff), nil
}
func readBytes(fp *os.File, len int)([]byte, error){
buff := make([]byte, len)
_, err := fp.Read(buff)
if err != nil {
return []byte{}, err
}
return buff, nil
}
func readFontSearchArgs(fp *os.File)([]uint16, error){
ret := []uint16{}
arg1, err := readUint16(fp)
if err != nil {
return ret, err
}
ret = append(ret, arg1)
arg1, err = readUint16(fp)
if err != nil {
return ret, err
}
ret = append(ret, arg1)
arg1, err = readUint16(fp)
if err != nil {
return ret, err
}
ret = append(ret, arg1)
return ret, nil
}
type ftable struct{
Name string
Sum uint32
Offset uint32
Length uint32
}
func readFontTables(fp *os.File, tables uint16)([]ftable, error){
ret := []ftable{}
for i := 0; i < int(tables); i++ {
t :=ftable{}
name, err := readString(fp, 4)
if err != nil {
return ret, err
}
t.Name = name
sum, err := readUint32(fp)
if err != nil {
return ret, err
}
t.Sum = sum
addr, err := readUint32(fp)
if err != nil {
return ret, err
}
t.Offset = addr
length, err := readUint32(fp)
if err != nil {
return ret, err
}
t.Length = length
ret = append(ret, t)
}
return ret, nil
}
func readNameTable(fp *os.File, offset uint32, length uint32)([]byte, error){
fp.Seek(int64(offset), 0)
return readBytes(fp, int(length))
}
func readFont(file string)error{
fp, err := os.OpenFile(file, os.O_RDONLY, os.ModePerm)
if err != nil {
return err
}
defer fp.Close()
verB, err := readUint16(fp)
if err != nil {
return err
}
verL, err := readInt16(fp)
if err != nil {
return err
}
fmt.Println("font head version is", fmt.Sprintf("%d.%d", verB, verL))
tableCount, err := readUint16(fp)
if err != nil {
return err
}
fmt.Println("font table count is", tableCount)
args, err := readFontSearchArgs(fp)
if err != nil {
return err
}
fmt.Println("font search args is", args)
tables, err := readFontTables(fp, tableCount)
if err != nil {
return err
}
nameBuff := []byte{}
for n, table := range tables {
fmt.Println("font table", n+1, ": name: ", table.Name, " sum: ", table.Sum, " offset: ", table.Offset, " length: ", table.Length)
if table.Name == "name" {
nameBuff, err = readNameTable(fp, table.Offset, table.Length)
}
}
if err != nil {
return err
}
fmt.Println("name table: ", string(nameBuff))
return nil
}
func main(){
err := readFont("文鼎中黑.ttf")
if err != nil {
panic(err)
}
}

BIN
go/mp3/j3chao.mp3 Normal file

Binary file not shown.

90
go/mp3/main.go Normal file
View File

@ -0,0 +1,90 @@
package main
import (
"fmt"
"github.com/bogem/id3v2/v2"
"github.com/spf13/cobra"
)
func show(file string)error{
mp3File, err := id3v2.Open(file, id3v2.Options{Parse: true})
if err != nil {
return err
}
fmt.Println("File: ", file)
fmt.Println("Title: ", mp3File.Title())
fmt.Println("Artist: ", mp3File.Artist())
fmt.Println("Genre: ", mp3File.Genre())
fmt.Println("Album: ", mp3File.Album())
fmt.Println("Version:", mp3File.Version())
fmt.Println("Year: ", mp3File.Year())
return nil
}
func set()*cobra.Command{
var artist, title, genre, year, version, album, file string
cmd := &cobra.Command{
Use: "set",
Short: "set [options] set mp3 file info",
Run: func(cmd *cobra.Command, args []string) {
mp3File, err := id3v2.Open(file, id3v2.Options{Parse: true})
if err != nil {
panic(err)
}
mp3File.SetDefaultEncoding(id3v2.EncodingUTF16)
if artist != "" {
mp3File.SetArtist(artist)
}
if title != "" {
mp3File.SetTitle(title)
}
if album != ""{
mp3File.SetAlbum(album)
}
if genre != "" {
mp3File.SetGenre(genre)
}
if year != "" {
mp3File.SetYear(year)
}
if version != "" {
mp3File.SetVersion(byte(version[0]))
}
err = mp3File.Save()
fmt.Println("save err ", err, artist, title)
if err != nil {
panic(err)
}
},
}
cmd.Flags().StringVarP(&file, "file", "f", "", "mp3 file to set")
cmd.Flags().StringVarP(&artist, "artist", "a", "", "mp3 file artist")
cmd.Flags().StringVarP(&title, "title", "t", "", "mp3 file title")
cmd.Flags().StringVarP(&genre, "genre", "g", "", "mp3 file genre")
cmd.Flags().StringVarP(&year, "year", "y", "", "mp3 file year")
cmd.Flags().StringVarP(&version, "version", "v", "", "mp3 file version")
cmd.Flags().StringVarP(&album, "album", "b", "", "mp3 file album")
return cmd
}
func main(){
cmd := &cobra.Command{
Short: "",
}
showCmd := &cobra.Command{
Use: "show",
Short: "show [file]",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
if err := show(args[0]); err != nil {
panic(err)
}
},
}
cmd.AddCommand(showCmd, set())
cmd.Execute()
}

BIN
go/mp3/mp3tool Executable file

Binary file not shown.

538
go/oss_image_resize/main.go Normal file
View File

@ -0,0 +1,538 @@
package main
import (
"bytes"
"flag"
"fmt"
"io"
"net/http"
"os"
"path"
"sort"
"strconv"
"strings"
"time"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
)
const (
metaKeyUpdatedAt = "UpdatedAt"
metaKeyModifiedAt = "Last-Modified"
metaKeyFileSize = "Content-Length"
)
type AliOSS struct {
bucket *oss.Bucket
client *oss.Client
endpoint string
accessKey string
secret string
bucketName string
}
func NewAliOSS(endpoint, accessKey, secret string, bucket string) *AliOSS {
return &AliOSS{
endpoint: endpoint,
accessKey: accessKey,
secret: secret,
bucketName: bucket,
}
}
func (a *AliOSS) Init(opts ...oss.ClientOption) error {
client, err := oss.New(a.endpoint, a.accessKey, a.secret, opts...)
if err != nil {
return err
}
a.client = client
a.bucket, err = client.Bucket(a.bucketName)
return err
}
// Copy 拷贝文件
func (a *AliOSS) Copy(src, dst string, opts ...oss.Option) error {
_, err := a.bucket.CopyObject(src, dst, opts...)
return err
}
func (a *AliOSS) Delete(f []string, opts ...oss.Option) ([]string, error) {
res, err := a.bucket.DeleteObjects(f, opts...)
return res.DeletedObjects, err
}
// Download 下载文件
func (a *AliOSS) Download(obj, savePath string, opts ...oss.Option) error {
err := a.bucket.GetObjectToFile(obj, savePath, opts...)
return err
}
// IsExist 判断文件是否存在
func (a *AliOSS) IsExist(obj string) (bool, error) {
return a.bucket.IsObjectExist(obj)
}
func (a *AliOSS) UploadObject(dest string, src io.Reader, opts ...oss.Option) error {
return a.bucket.PutObject(dest, src, opts...)
}
func (a *AliOSS) UploadByte(dest string, buf []byte, opts ...oss.Option) error {
return a.UploadObject(dest, bytes.NewReader(buf), opts...)
}
func (a *AliOSS) UploadStream(dest string, src *os.File, opts ...oss.Option) error {
// 读取本地文件。
return a.UploadObject(dest, src, opts...)
}
func (a *AliOSS) UploadFile(dest string, filePath string, opts ...oss.Option) error {
err := a.bucket.PutObjectFromFile(dest, filePath, opts...)
return err
}
// set meta
func (a *AliOSS) SetObjectMeta(file string, key, val string) error {
meta := oss.Meta(key, val)
err := a.bucket.SetObjectMeta(file, meta)
return err
}
// set metas
func (a *AliOSS) SetObjectMetaMap(file string, metaMap map[string]string) error {
metas := []oss.Option{}
for k, v := range metaMap {
metas = append(metas, oss.Meta(k, v))
}
if len(metas) == 0 {
return nil
}
return a.bucket.SetObjectMeta(file, metas...)
}
// get metas
func (a *AliOSS) GetObjectMeta(file string) (map[string]string, error) {
res := make(map[string]string)
metas, err := a.bucket.GetObjectMeta(file)
for k, v := range metas {
val := ""
if len(v) > 0 {
val = v[0]
}
res[k] = val
}
return res, err
}
// set updatedAt
func (a *AliOSS) SetUpdatedAt(file string, updatedAt *time.Time) error {
if updatedAt == nil {
now := time.Now()
updatedAt = &now
}
return a.SetObjectMeta(file, metaKeyUpdatedAt, strconv.FormatInt(updatedAt.Unix(), 10))
}
// get updatedAt
func (a *AliOSS) GetUpdatedAt(file string) (int64, error) {
metas, err := a.GetObjectMeta(file)
if err != nil {
return 0, err
}
if u, ok := metas[metaKeyUpdatedAt]; ok {
i, err := strconv.ParseInt(u, 10, 64)
return i, err
}
return 0, nil
}
// get updatedAt
func (a *AliOSS) GetModifiedAt(file string) (int64, error) {
metas, err := a.GetObjectMeta(file)
if err != nil {
return 0, err
}
if u, ok := metas[metaKeyModifiedAt]; ok {
//Thu, 07 Apr 2022 03:13:49 GMT
t, err := time.Parse(time.RFC1123, u)
return t.Unix(), err
}
return 0, nil
}
// upload stream with set updated at
func (a *AliOSS) UploadObjectWithUpdatedAt(dest string, src io.Reader, opts ...oss.Option) error {
opt := oss.Meta(metaKeyUpdatedAt, strconv.FormatInt(time.Now().Unix(), 10))
opts = append(opts, opt)
return a.UploadObject(dest, src, opts...)
}
// upload file with set updated at
func (a *AliOSS) UploadFileWithUpdatedAt(dest string, src string, opts ...oss.Option) error {
err := a.UploadFile(dest, src, opts...)
if err != nil {
return err
}
return a.SetUpdatedAt(dest, nil)
}
// upload bytes with set updated at
func (a *AliOSS) UploadBytesWithUpdatedAt(dest string, src []byte, opts ...oss.Option) error {
opt := oss.Meta(metaKeyUpdatedAt, strconv.FormatInt(time.Now().Unix(), 10))
opts = append(opts, opt)
return a.UploadByte(dest, src, opts...)
}
func (a *AliOSS) Name() string {
return a.bucketName
}
// check file version, if not need download ,return true
func (a *AliOSS) CheckFileVersion(obj string, info os.FileInfo) (bool, error) {
metas, err := a.GetObjectMeta(obj)
if err != nil {
return true, err
}
// var modifiedAt time.Time
var modifiedAt int64
if u, ok := metas[metaKeyModifiedAt]; ok {
//Thu, 07 Apr 2022 03:13:49 GMT
t, err := time.Parse(time.RFC1123, u)
if err == nil {
modifiedAt = t.Unix()
}
// modifiedAt, _ = strconv.ParseInt(u, 10, 64)
}
//TODO is need to check file size??
// var length int64 = 0
// if u, ok := metas[metaKeyFileSize]; ok {
// n, err := strconv.ParseInt(u, 10, 64)
// if err == nil {
// length = n
// }
// }
//如果本地文件时间更靠后或者本地文件更大返回true
// return info.ModTime().Unix() >= modifiedAt || length <= info.Size(), nil
//如果本地文件时间更靠后返回true, 防止意外退出,未成功上传
return info.ModTime().Unix() >= modifiedAt, nil
}
// const host = "http://testspeed.xk.design"
const MAX = 300
type file struct{
Name string
Width int
Height int
Src string
}
var test1 = []file{
{
Name: "test4k.jpg",
Width: 0,
Height: 0,
Src: "test4k.jpg",
},
{
Name: "test2k.jpg",
Width: 2590,
Height: 1619,
Src: "test4k.jpg",
},
{
Name: "test1k.jpg",
Width: 1831,
Height: 1144,
Src: "test4k.jpg",
},
{
Name: "test600.jpg",
Width: 647,
Height: 404,
Src: "test4k.jpg",
},
{
Name: "test1of10.jpg",
Width: 384,
Height: 240,
Src: "test4k.jpg",
},
}
var test2 = []file{
{
Name: "8ktestsrc.jpeg",
Width: 7680,
Height: 4320,
Src: "8ktestsrc.jpeg",
},
{
Name: "8ktest3k.jpeg",
Width: 2730,
Height: 1536,
Src: "8ktestsrc.jpeg",
},
{
Name: "8ktest1080.jpeg",
Width: 1930,
Height: 1086,
Src: "8ktestsrc.jpeg",
},
{
Name: "8ktest682.jpeg",
Width: 682,
Height: 384,
Src: "8ktestsrc.jpeg",
},
{
Name: "8ktest400.jpeg",
Width: 400,
Height: 225,
Src: "8ktestsrc.jpeg",
},
{
Name: "8ktest300.jpeg",
Width: 300,
Height: 300,
Src: "8ktestsrc.jpeg",
},
}
func NewRequest(url string)(*http.Request, error){
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
return nil, err
}
req.Header.Add("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
req.Header.Add("Accept-Encoding","gzip, deflate")
req.Header.Add("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.56")
req.Header.Add("Accept-Language","zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6")
req.Header.Add("Cache-Control","no-cache")
req.Header.Add("Connection"," keep-alive")
req.Header.Add("Cookie"," Hm_lvt_2e2c80c1bd8a51afc2d7de641330a397=1669089775,1669615598,1669704782,1669875251; Hm_lpvt_2e2c80c1bd8a51afc2d7de641330a397=1669964998")
req.Header.Add("Host"," test-pic.xk.design")
// req.Header.Add("If-Modified-Since"," Fri, 02 Dec 2022 06:31:28 GMT")
// req.Header.Add("If-None-Match","\"4B8579BA5E07DD57405973606E777476\"")
// req.Header.Add("Upgrade-Insecure-Requests","1")
return req, nil
}
func test(f file, count int, host string){
fmt.Printf("begin normal testing for %s\n", f.Name)
startedAt := time.Now().UnixMilli()
errCount := 0
costMS := []int64{}
for i := 0; i < count; i ++ {
req, err := NewRequest(host + "/" + f.Name)
if err != nil {
errCount ++
continue
}
client := &http.Client{}
begin := time.Now().UnixMilli()
resp, err := client.Do(req)
if err != nil {
errCount++
continue
}
defer resp.Body.Close()
data, err := io.ReadAll(resp.Body)
os.WriteFile("/dev/null", data, os.ModePerm)
if err != nil {
errCount++
continue
}
end := time.Now().UnixMilli()
costMS = append(costMS, end-begin)
}
finishedAt := time.Now().UnixMilli()
totalCost := finishedAt - startedAt
fmt.Printf("in %d tests for file %s@%dx%d, cost %d ms, errors: %d", MAX, f.Src, f.Width, f.Height, totalCost, errCount)
statistics(costMS)
}
func testResize(f file, count int, host string)(int64, int64, int64){
fmt.Printf("begin resize testing for %s\n", f.Name)
startedAt := time.Now().UnixMilli()
errCount := 0
costMS := []int64{}
for i := 0; i < count; i ++ {
query := "?x-oss-process=image/resize,m_lfit,w_"+strconv.Itoa(f.Width) + ",h_" + strconv.Itoa(f.Height)
if f.Height == 0 || f.Width == 0 {
query = ""
}
req, err := NewRequest(host + "/" + f.Src + query)
if err != nil {
errCount++
continue
}
client := http.Client{}
begin := time.Now().UnixMilli()
resp, err := client.Do(req)
if err != nil {
errCount++
continue
}
defer resp.Body.Close()
data, err := io.ReadAll(resp.Body)
os.WriteFile("/dev/null", data, os.ModePerm)
if err != nil {
errCount++
continue
}
end := time.Now().UnixMilli()
costMS = append(costMS, end-begin)
// if resp != nil {
// fmt.Println(resp , resp.StatusCode, resp.Status)
// }
}
finishedAt := time.Now().UnixMilli()
totalCost := finishedAt - startedAt
fmt.Printf("in %d tests for file %s@%dx%d, cost %d ms, errors: %d", MAX, f.Src, f.Width, f.Height, totalCost, errCount)
return statistics(costMS)
}
func filelist(dir string)([]string, error){
fis, err := os.ReadDir(dir)
if err != nil {
return nil, err
}
fs := []string{}
for _, f := range fis {
if !f.IsDir() {
fs = append(fs, f.Name())
}
}
return fs, nil
}
func case3(dir string, ak string, sk string, count int, host string)error{
files, err := filelist(dir)
if err != nil {
return err
}
alioss := NewAliOSS("oss-cn-hangzhou.aliyuncs.com", ak,sk, "oxslmimg")
alioss.Init()
avgmap := make(map[string][]string)
p95map := make(map[string][]string)
for _, f := range files {
err = alioss.UploadFile(f, path.Join(dir,f))
if err != nil {
fmt.Println("upload failed:", err, f, path.Join(dir,f))
continue
}
avgmap[f] = []string{}
p95map[f] = []string{}
for _, t := range test1 {
t.Src = f
t.Name = f
avg, p95, _ := testResize(t, count, host)
avgmap[f] = append(avgmap[f], strconv.FormatInt(avg, 10))
p95map[f] = append(p95map[f], strconv.FormatInt(p95, 10))
}
}
fmt.Println("")
for f, v := range avgmap {
fmt.Printf("%s\t%s\n", f, strings.Join(v, "\t"))
}
for f, v := range p95map {
fmt.Printf("%s\t%s\n", f, strings.Join(v, "\t"))
}
return nil
}
func avg(data []int64)int64{
if len(data) == 0 {
return 0
}
total := int64(0)
for _, i := range data {
total = total + i
}
return total/int64(len(data))
}
type SortInt64 []int64
func (a SortInt64) Len() int { return len(a) }
func (a SortInt64) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a SortInt64) Less(i, j int) bool { return a[i] < a[j] }
func percent50(data []int64)int64{
if len(data) == 0 {
return 0
}
i := int(float64(len(data)) * 0.5 )
if i == len(data) {
return 0
}
return data[i]
}
func percent90(data []int64)int64{
if len(data) == 0 {
return 0
}
i := int(float64(len(data)) * 0.9 )
if i == len(data) {
return 0
}
return data[i]
}
func percent95(data []int64)int64{
if len(data) == 0 {
return 0
}
i := int(float64(len(data)) * 0.95 )
if i == len(data) {
return 0
}
return data[i]
}
func max(data []int64)int64{
return data[len(data)-1]
}
func statistics(data []int64)(int64, int64, int64){
a := avg(data)
sort.Sort(SortInt64(data))
m := percent50(data)
p9 := percent90(data)
p95 := percent95(data)
ma := max(data)
fmt.Printf("\t avg: %d middle: %dms percent90: %dms percent95: %dms max: %dms\n", a, m, p9, p95, ma)
return a, p95, ma
}
func main(){
var tcase, count int
var host, ak, sk, dir string
flag.IntVar(&tcase, "case", 1, "which test case to use")
flag.IntVar(&count, "count", 100, "total test count")
flag.StringVar(&host, "host", "http://testspeed.xk.design", "access host")
flag.StringVar(&ak, "ak", "", "access key")
flag.StringVar(&sk, "sk", "", "access secret")
flag.StringVar(&dir , "dir", "", "img path")
flag.Parse()
switch tcase {
case 1:
for _, f := range test1 {
test(f, count, host)
testResize(f, count, host)
}
case 2:
for _, f := range test2 {
test(f, count, host)
testResize(f, count, host)
}
case 3:
case3(dir, ak, sk, count, host)
}
}

1
go/tensorflow/main.go Normal file
View File

@ -0,0 +1 @@
package main

31
go/test.go Normal file
View File

@ -0,0 +1,31 @@
package test
type Cmd interface{
Result()bool
Output()string
}
type cmd struct{
r bool
o string
}
func (c *cmd)exec(s string, args ...string){
//....
// c.r = ...
//c.o = ...
}
func (c *cmd)Result()bool{
return c.r
}
func (c *cmd)Output()string{
return c.o
}
func Exec(s string, args ...string)Cmd{
c := &cmd{}
c.exec(s, args...)
return c
}

0
go/uiweb/SC/test.txt Normal file
View File

35
go/uiweb/index.tmpl Normal file
View File

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- import CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<title>{{.title}}</title>
</head>
<body>
<div class="jumbotron jumbotron-fluid" style="height:100vh" >
<div class="container">
<div class="">
<h3 style="text-align: center;">{{.title}}</h3>
</div>
<hr class="my-4" >
{{ range $file := .files }}
<div class="row" style="">
{{ if eq $file "SC" }}
<div style="width:80%;" class="p-3 mb-2 bg-light text-dark"><a href="/{{$file}}">{{$file}}</a></div>
{{ else }}
<div style="width:80%;" class="p-3 mb-2 bg-light text-dark"><a href="/ui/{{$file}}">{{$file}}</a></div>
{{ end }}
</div>
{{else}}
<div class="" style="">
<p>这家伙很懒,还没有发布任何信息</p>
</div>
{{end}}
</div>
</div>
<!-- import JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
</body>
</html>

49
go/uiweb/main.go Normal file

File diff suppressed because one or more lines are too long

BIN
go/uiweb/uiweb Executable file

Binary file not shown.

View File

@ -36,7 +36,7 @@ controller-gen crd --paths=/git/demo/api/... output:dir=/git/demo/crd
安装
```bash
wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.4.1/kubebuilder_linux_amd64 -O ${HOME}/go/bin/kubebuilder
wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.13.0/kubebuilder_linux_amd64 -O ${HOME}/go/bin/kubebuilder
chmod +x ${HOME}/go/bin/kubebuilder
```
@ -74,7 +74,7 @@ kubebuilder create api --group project.demo.io --version v1 --kind Demo
安装
```bash
go get sigs.k8s.io/kustomize/kustomize/v3
go get sigs.k8s.io/kustomize/kustomize/v5.3.0
```
使用方法参见[官方指南](https://kubectl.docs.kubernetes.io/zh/guides)

View File

@ -41,5 +41,7 @@ kubectl taint nodes --all node-role.kubernetes.io/control-plane-
### 安装calico
```bash
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
# kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/tigera-operator.yaml
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/custom-resources.yaml
```

View File

@ -2,7 +2,7 @@
HTTPS_PROXY=$1
IMAGE_REGISTRY=$2
IMAGE_REGISTRY_USER=$3
IMAGES=$(kubeadm config images list | grep k8s.gcr.io)
IMAGES=$(kubeadm config images list | grep registry.k8s.io)
for IMAGE in ${IMAGES[@]}
do
echo "pull image ${IMAGE}"
@ -12,4 +12,12 @@ do
ctr images push -k -u ${IMAGE_REGISTRY_USER} ${IMAGE_REGISTRY}/${IMAGE_NAME}
# ctr images rm ${IMAGE}
done
#192.168.0.144:1080 ccr.ccs.tencentyun.com/kgcrio 100004225373:Hello2022
#192.168.0.144:1080 ccr.ccs.tencentyun.com/kgcrio 100004225373
#192.168.0.144:1080 ccr.ccs.tencentyun.com/kgcrio 100004225373:Hello2022
https_proxy=192.168.0.200:1080 ctr images pull --all-platforms registry.k8s.io/prometheus-adapter/prometheus-adapter:v0.10.0
https_proxy=192.168.0.200:1080 ctr images pull --all-platforms registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.8.2
ctr images tag registry.k8s.io/prometheus-adapter/prometheus-adapter:v0.10.0 registry.cn-hangzhou.aliyuncs.com/slmgoogle/prometheus-adapter:v0.10.0
ctr images tag registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.9.2 registry.cn-hangzhou.aliyuncs.com/slmgoogle/kube-state-metrics:v2.9.2
registry-vpc.cn-hangzhou.aliyuncs.com/slmgoogle

View File

@ -13,5 +13,5 @@ kubectl create secret docker-registry myregistrykey --docker-server=registry.bin
```bash
kubectl -n soulma create secret docker-registry txcloud --docker-server=ccr.ccs.tencentyun.com --docker-username=100004225373 --docker-password=Hello2022 --docker-email=766619031@qq.com
kubectl -n soulma create secret docker-registry txcloud --docker-server=ccr.ccs.tencentyun.com --docker-username=100004225373 --docker-password=abcd1234 --docker-email=766619031@qq.com
```

View File

@ -0,0 +1,26 @@
# ThinkBook 14+ 2024 IMH 安装ubuntu 24.04的一些问题
## 声卡
```bash
git clone https://github.com/thesofproject/sof-bin.git
cd sof-bin/
mkdir /opt/backups/firmware -p
sudo mv /lib/firmware/intel/sof* /opt/backups/firmware/
sudo ./install.sh v2.2.x/v2.2
sudo reboot
```
## 触摸板
```bash
sudo apt install make cmake gcc g++ gdb
git clone https://github.com/ty2/goodix-gt7868q-linux-driver.git
cd goodix-gt7868q-linux-driver/
make
sudo insmod goodix-gt7868q.ko
sudo mv goodix-gt7868q.ko /lib/modules/6.8.0-39-generic/kernel/drivers/
sudo depmod -a
sudo vim /etc/modprobe.d/goodix.conf
sudo reboot
```

BIN
nas/install/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

BIN
nas/install/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 KiB

BIN
nas/install/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

BIN
nas/install/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

BIN
nas/install/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

BIN
nas/install/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

BIN
nas/install/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
nas/install/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
nas/install/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
nas/install/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

BIN
nas/install/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 KiB

BIN
nas/install/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

BIN
nas/install/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 KiB

BIN
nas/install/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

BIN
nas/install/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

502
nas/install/readme.md Normal file
View File

@ -0,0 +1,502 @@
# Linux系统部署nas服务
最近因为频繁停电用了半年的黑裙变成只读了但是扫描之后硬盘并没有问题。本人对群晖也不熟悉网上搜了一圈也没处理好一气之下备份好数据格式化之后装了个truenas。可是好景不长truenas又因为我配置太差开机10分钟就OOM了忍无可忍要自由还是原生Linux直接装了rockylinux9.4所有服务全部手动配置现在已经稳定工作3天。
## 配置:
CPU: AMD R5 5600G
主板华硕TUFB550 WIFI 2
内存光威16GB x2
硬盘西数紫盘6TBx4 + 西数紫盘4TBx4
目前已安装并运行的服务nfs filebrowserqBittorrentopenWRT(kvm)jellyfin
## 安装教程
### 安装Rockylinux9((虚拟机截图。原服务器配置过程未截图)
镜像下载地址https://mirrors.ustc.edu.cn/rocky/9/isos/x86_64/Rocky-9-latest-x86_64-minimal.iso
也可以下载完整的dvd都一样如果是本地安装写入U盘后需要把iso也考进U盘不然用网络装。现在网络这么发达了我基本上都是用网络装。
#### 先来一张hype-v虚拟机(第二代)截图为什么停在这个界面呢因为要展示一下需要关闭Security Boot才好安装
![](1.png)
#### 进入grub boot界面。选择第一项进入安装界面也可以第二项会检查安装媒体我这里就不检查了。
![](2.png)
注意如果不是虚拟机使用U盘启动物理机的话要按e'修改第一项。把“LABEL=ROCKY-9-4-x86_64-dvd 改掉。如下图。不同机器和不同U盘写入工具有所区别也有可能是/dev/sda4, 根据当前已经安装硬盘数,也可能是 /dev/sdi1或/dev/sdi4
![](3.png)
#### 进入安装语言选择
![](4.png)
不要问选English。纯Linux选个中文我看着就难受。Continue 进入安装配置
![](5.png)
#### 配置安装源,从网络安装 这里使用中国科技大学的源 https://mirrors.ustc.edu.cn/rocky/9/BaseOS/x86_64/os/ 配好点Done
![](6.png)
#### 选择安装内容物理机建议装个界面因为all in one,没事还能拿来写写代码当然安装界面会耗电多一些。如果不需要界面建议minimal 。选完点Done
![](7.png)
#### 配置磁盘这里我custom。物理机大磁盘强烈建议custom。点done进入自定义配置界面
![](8.png)
我先偷懒点个自动分区
![](9.png)
如果你不知道还有多少可用空间在分区大小哪里写个超大值点Update 就会用光所有剩余空间。改完点Done。如果没有swap或者点一次没效果可能要连点两次Done
![](10.png)
点Accept Changes
#### 关闭KDump
![](12.png)
#### 创建用户
![](13.png)
#### 配置机器名和网络
![](14.png)
#### 等待安装完成
一切配置完成就可以点Begin Installation了
![](11.png)
等待安装完成拔掉U盘(虚拟机弹出ISO按Reboot
## 系统配置
输入账号密码进入系统。打开terminal
使用 sudo visudo 命令修改sudo无需密码。:set nu可以显示行号:107可以直接定位到这一行。i进入编辑模式。注释107行取消注释110行。CTRL+C退出编辑模式。:wq 退出并保存。
![](15.png)
### 使用国内源(这里用中科大的)
```bash
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.ustc.edu.cn/rocky|g' -i.bak /etc/yum.repos.d/rocky-extras.repo /etc/yum.repos.d/rocky.repo
```
系统安装配置完成。接下来操作都是命令行操作不再附截图。可以使用Windows terminal远程操作也可以在本机的terminal上操作。
### 更新系统
```bash
sudo dnf makecache && sudo dnf update
```
### 关闭防火墙。防火墙配置比较复杂,这里不做介绍
```bash
sudo systemctl disable --now firewalld
```
### 修改selinux
```bash
sudo sed -i 's/SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
sudo setenforce 0
```
### 查看ip方便后面ssh
```bash
ip addr
```
### 安装常用软件
```bash
sudo dnf install vim unzip tar ungzip bzip2
```
### 磁盘分区与格式化
分区使用命令行分区工具`parted`
**parted需要管理权限。**
```bash
sudo parted /dev/sda #选择第一个磁盘直接输入sudo parted 默认选择/dev/sda
```
parted命令说明
```bash
print all #显示当前系统所有磁盘
select /dev/sdb #选择磁盘/dev/sdb 之后的所有操作均是针对于/dev/sdb直至下一个select
mktable gpt # 创建gpt分区表。如果已经有分区的磁盘会提示输入yes即可覆盖
mkpart primary 0% 100% #创建一个主分区,并且使用全部容量 0%开始100%结束。如果要分多个区可以自行修改。
q #quit 退出
```
mkfs 分区格式化
**mkfs需要管理员权限**
```bash
sudo mkfs.ext4 /dev/sda1 #将/dev/sda第一个分区格式化为ext4格式
sudo mkfs.ext4 -T /dev/sda1 #将/dev/sda第一个分区格式化为ext4格式,大硬盘用这个命令快
sudo mkfs.xfs /dev/sda1 #将/dev/sda第一个分区格式化为xfs格式
sudo mkfs.ntfs /dev/sda1 #将/dev/sda第一个分区格式化为ntfs格式。此格式需要安装epel软件库和ntfsprogs, ntfs-3g软件包
```
***我一般喜欢用xfs。***
### 安装docker
```bash
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo sed -i 's|download.docker.com|mirrors.ustc.edu.cn/docker-ce|g' /etc/yum.repo.d/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```
启动docker并配置docker开机自启动
```bash
sudo systemctl enable --now docker
```
### lvm分区
进入root账号
```bash
sudo -i
```
创建pv,删除使用pvremove
```bash
pvcreate /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
查看创建的pv
```bash
pvs #pvdisplay
```
创建vg 删除使用vgremove
```bash
vgcreate vg_data /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
```
查看创建的vg
```bash
vgs #vgdisplay
```
创建 lv 删除使用 lvremove
```bash
lvcreate -l 100%FREE -n lv_data vg_data
```
创建RAID10 lv。这里是软RAID有条件可以硬raid。
```bash
lvcreate --type raid10 --raidintegrity y -L 7.2T -n lv_data vg_raid
```
查看创建的lv
```bash
lvs #lvdisplay
```
格式化lvm磁盘。raid10盘格式化时间比较长
```bash
mkfs.xfs /dev/mapper/vg_data-lv_data
mkfs.xfs /dev/mapper/vg_raid-lv_data
```
挂载lvm磁盘
```bash
mkdir /data /private
echo '/dev/mapper/vg_data-lv_data /data xfs defaults 1 2' >> /etc/fstab
echo '/dev/mapper/vg_raid-lv_data /private xfs defaults 1 2' >> /etc/fstab
mount -a
exit
chown -R $(whoami) /data
chown -R $(whoami) /private
```
**注意最后两行修改所有者不改的话docker挂载进去可能没权限读写**
查看磁盘信息
```bash
df -lh
```
安装配置nfs
安装
```bash
sudo dnf install nfs-utils rpcbind
```
设置为开机自启动
```bash
sudo systemctl enable --now ntfs-server rpcbind
```
配置共享目录
```bash
vim /etc/exports #下面是内容这里视频使用ro权限
/data/video 10.0.0.0/24(ro,insecure,sync,no_root_squash,no_subtree_check)
```
应用
```bash
sudo exportfs -a
```
创建网桥
不需要虚拟机不需要此步骤
查看当前网络连接信息
```bash
nmcli con show
```
创建网桥
```bash
nmcli con add type bridge ifname br0
```
绑定网桥到网卡
```bash
nmcli con add type bridge-slave ifname eno1 master br0
```
启动网桥
```bash
nmcli con up br0
```
配置 ip地址
```bash
sudo nmcli c edit br0
```
以下命令在nmcli命令行下
```bash
print ipv4
set ipv4.addresses 10.0.0.128/24
set ipv4.gateway 10.0.0.254
set ipv4.dns 10.0.0.254 223.5.5.5
save
q
```
重启网卡/重启电脑
```bash
sudo nmcli c reload
sudo nmcli c down br0 && sudo nmcli c up br0
```
安装虚拟机
使用难用的virt-manager界面操作。
查看一下库里有哪些软件组
```bash
sudo dnf grouplist
```
安装相关软件
```bash
sudo dnf groupinstall 'Virtualization Host'
sudo dnf install virt-manager
```
注意: 也可以只安装virt全命令行操作。
转换openwrt的img文件为qcow2格式
```bash
qemu-img convert -o qcow2 openwrt.img openwrt.qcow2
```
## docker部署filebrowser/qbittorrent/jellyfin
### jellyfin
```bash
sudo docker run -d
-p 8096:8096
--name jellyfin
--user 1000:1000
--volume /opt/jellyfin/config:/config
--volume /opt/jellyfin/cache:/cache
--mount type=bind,source=/data/video,target=/media
--restart=unless-stopped
jellyfin/jellyfin
```
### filebrowser
```bash
sudo docker run
--name filebrowser -m 4g --restart unless-stopped -d
-v /data:/srv/data
-v /private:/srv/private
-v /opt/filebrowser/filebrowser.db:/database/filebrowser.db
-v /opt/filebrowser/settings.json:/config/settings.json
-e PUID=$(id -u)
-e PGID=$(id -g)
-p 8080:80
filebrowser/filebrowser:s6
```
### qbittorrent
```bash
sudo docker run -d
--name=qbittorrent
-e PUID=1000
-e PGID=1000
-e TZ=Asia/Shanghai
-e WEBUI_PORT=8081
-e TORRENTING_PORT=6881
-p 8081:8081
-p 6881:6881
-p 6881:6881/udp
-v /opt/qbittorrent/config:/config
-v /data/downloads:/downloads
--restart unless-stopped
lscr.io/linuxserver/qbittorrent:latest
```
### 配置nginx
安装nginx
```bash
sudo dnf install nginx
```
配置filebrowser能用就行不做优化。替换自己的域名
```bash
cat EOF< |sudo tee -a /etc/nginx/conf.d/filebrowser.conf
server {
server_name files.nas.com;
location / {
proxy_pass http://localhost:8080;
}
listen 80;
}
EOF
```
配置qbittorrent能用就行不做优化。替换自己的域名
```bash
cat EOF< |sudo tee -a /etc/nginx/conf.d/qbittorrent.conf
server {
server_name bt.nas.com;
location / {
proxy_pass http://localhost:8081;
}
listen 80;
}
EOF
```
配置jellyfin能用就行不做优化。替换自己的域名
```bash
cat EOF< |sudo tee -a /etc/nginx/conf.d/jellyfin.conf
server {
server_name video.nas.com;
location / {
proxy_pass http://localhost:8096;
}
listen 80;
}
EOF
```
还有K8S已经装好了暂时就不写了。准备用coredns暂时也还没有配置。原生Linux服务全部自定义没有继承nas系统的各种限制就一个字没事还能拿来玩个steam岂不美哉