httpserver

package
v1.13.8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Discover discover string
	Discover string = "Discover"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResourceArr

type AuthResourceArr []*api.StrategyResources

AuthResourceArr 命名空间数组定义

func (*AuthResourceArr) ProtoMessage

func (*AuthResourceArr) ProtoMessage()

ProtoMessage return proto message

func (*AuthResourceArr) Reset

func (m *AuthResourceArr) Reset()

Reset 清空数组

func (*AuthResourceArr) String

func (m *AuthResourceArr) String() string

String return string

type ConfigFileArr

type ConfigFileArr []*api.ConfigFile

ConfigFileArr 配置文件数组定义

func (*ConfigFileArr) ProtoMessage

func (*ConfigFileArr) ProtoMessage()

ProtoMessage proto message

func (*ConfigFileArr) Reset

func (m *ConfigFileArr) Reset()

Reset reset initialization

func (*ConfigFileArr) String

func (m *ConfigFileArr) String() string

String return string

type ConfigReleaseArr

type ConfigReleaseArr []*api.ConfigRelease

ConfigReleaseArr 发布规则数组定义

func (*ConfigReleaseArr) ProtoMessage

func (*ConfigReleaseArr) ProtoMessage()

ProtoMessage return proto message

func (*ConfigReleaseArr) Reset

func (m *ConfigReleaseArr) Reset()

Reset reset initialization

func (*ConfigReleaseArr) String

func (m *ConfigReleaseArr) String() string

String return string

type GroupArr

type GroupArr []*api.UserGroup

GroupArr 命名空间数组定义

func (*GroupArr) ProtoMessage

func (*GroupArr) ProtoMessage()

ProtoMessage return proto message

func (*GroupArr) Reset

func (m *GroupArr) Reset()

Reset 清空数组

func (*GroupArr) String

func (m *GroupArr) String() string

String return string

type HTTPServer

type HTTPServer struct {
	// contains filtered or unexported fields
}

HTTPServer HTTP API服务器

func (*HTTPServer) AuthStatus

func (h *HTTPServer) AuthStatus(req *restful.Request, rsp *restful.Response)

AuthStatus auth status

func (*HTTPServer) BatchCleanInstances

func (h *HTTPServer) BatchCleanInstances(req *restful.Request, rsp *restful.Response)

func (*HTTPServer) BatchDeleteConfigFile

func (h *HTTPServer) BatchDeleteConfigFile(req *restful.Request, rsp *restful.Response)

BatchDeleteConfigFile 批量删除配置文件

func (*HTTPServer) CleanInstance

func (h *HTTPServer) CleanInstance(req *restful.Request, rsp *restful.Response)

CleanInstance 彻底清理flag=1的实例运维接口 支持一个个清理

func (*HTTPServer) CloseConnections

func (h *HTTPServer) CloseConnections(req *restful.Request, rsp *restful.Response)

CloseConnections 关闭指定client ip的连接

func (*HTTPServer) CreateConfigFile

func (h *HTTPServer) CreateConfigFile(req *restful.Request, rsp *restful.Response)

CreateConfigFile 创建配置文件

func (*HTTPServer) CreateConfigFileGroup

func (h *HTTPServer) CreateConfigFileGroup(req *restful.Request, rsp *restful.Response)

CreateConfigFileGroup 创建配置文件组

func (*HTTPServer) CreateConfigFileTemplate

func (h *HTTPServer) CreateConfigFileTemplate(req *restful.Request, rsp *restful.Response)

CreateConfigFileTemplate create config file template

func (*HTTPServer) CreateGroup

func (h *HTTPServer) CreateGroup(req *restful.Request, rsp *restful.Response)

CreateGroup 创建用户组

func (*HTTPServer) CreateStrategy

func (h *HTTPServer) CreateStrategy(req *restful.Request, rsp *restful.Response)

CreateStrategy 创建鉴权策略

func (*HTTPServer) CreateUsers

func (h *HTTPServer) CreateUsers(req *restful.Request, rsp *restful.Response)

CreateUsers 批量创建用户

func (*HTTPServer) DeleteConfigFile

func (h *HTTPServer) DeleteConfigFile(req *restful.Request, rsp *restful.Response)

DeleteConfigFile 删除单个配置文件,删除配置文件也会删除配置文件发布内容,客户端将获取不到配置文件

func (*HTTPServer) DeleteConfigFileGroup

func (h *HTTPServer) DeleteConfigFileGroup(req *restful.Request, rsp *restful.Response)

DeleteConfigFileGroup 删除配置文件组

func (*HTTPServer) DeleteGroups

func (h *HTTPServer) DeleteGroups(req *restful.Request, rsp *restful.Response)

DeleteGroups 删除用户组

func (*HTTPServer) DeleteStrategies

func (h *HTTPServer) DeleteStrategies(req *restful.Request, rsp *restful.Response)

DeleteStrategies 批量删除鉴权策略

func (*HTTPServer) DeleteUsers

func (h *HTTPServer) DeleteUsers(req *restful.Request, rsp *restful.Response)

DeleteUsers 批量删除用户

func (*HTTPServer) FreeOSMemory

func (h *HTTPServer) FreeOSMemory(req *restful.Request, rsp *restful.Response)

FreeOSMemory 增加一个释放系统内存的接口

func (*HTTPServer) GetAdminServer

func (h *HTTPServer) GetAdminServer() *restful.WebService

GetAdminServer get admin server

func (*HTTPServer) GetAllConfigFileTemplates

func (h *HTTPServer) GetAllConfigFileTemplates(req *restful.Request, rsp *restful.Response)

GetAllConfigFileTemplates get all config file template

func (*HTTPServer) GetAuthServer

func (h *HTTPServer) GetAuthServer(ws *restful.WebService) error

GetAuthServer 运维接口

func (*HTTPServer) GetClientServer

func (h *HTTPServer) GetClientServer(ws *restful.WebService) error

func (*HTTPServer) GetConfigAccessServer

func (h *HTTPServer) GetConfigAccessServer(include []string) (*restful.WebService, error)

GetConfigAccessServer 获取配置中心接口

func (*HTTPServer) GetConfigFile

func (h *HTTPServer) GetConfigFile(req *restful.Request, rsp *restful.Response)

GetConfigFile 获取单个配置文件

func (*HTTPServer) GetConfigFileRelease

func (h *HTTPServer) GetConfigFileRelease(req *restful.Request, rsp *restful.Response)

GetConfigFileRelease 获取配置文件最后一次发布内容

func (*HTTPServer) GetConfigFileReleaseHistory

func (h *HTTPServer) GetConfigFileReleaseHistory(req *restful.Request, rsp *restful.Response)

GetConfigFileReleaseHistory 获取配置文件发布历史,按照发布时间倒序排序

func (*HTTPServer) GetCoreV1ConsoleAccessServer

func (h *HTTPServer) GetCoreV1ConsoleAccessServer(ws *restful.WebService, include []string) error

GetCoreConsoleAccessServer 增加配置中心模块之后,namespace 作为两个模块的公共模块需要独立, restful path 以 /core 开头

func (*HTTPServer) GetGroup

func (h *HTTPServer) GetGroup(req *restful.Request, rsp *restful.Response)

GetGroup 获取用户组详细

func (*HTTPServer) GetGroupToken

func (h *HTTPServer) GetGroupToken(req *restful.Request, rsp *restful.Response)

GetGroupToken 获取用户组 token

func (*HTTPServer) GetGroups

func (h *HTTPServer) GetGroups(req *restful.Request, rsp *restful.Response)

GetGroups 获取用户组列表

func (*HTTPServer) GetLastHeartbeat

func (h *HTTPServer) GetLastHeartbeat(req *restful.Request, rsp *restful.Response)

GetLastHeartbeat 获取实例,上一次心跳的时间

func (*HTTPServer) GetLogOutputLevel

func (h *HTTPServer) GetLogOutputLevel(req *restful.Request, rsp *restful.Response)

GetLogOutputLevel 获取日志输出级别

func (*HTTPServer) GetMaintainAccessServer

func (h *HTTPServer) GetMaintainAccessServer() *restful.WebService

GetMaintainAccessServer 运维接口

func (*HTTPServer) GetPort

func (h *HTTPServer) GetPort() uint32

GetPort 获取端口

func (*HTTPServer) GetPrincipalResources

func (h *HTTPServer) GetPrincipalResources(req *restful.Request, rsp *restful.Response)

GetPrincipalResources 获取鉴权策略详细

func (*HTTPServer) GetProtocol

func (h *HTTPServer) GetProtocol() string

GetProtocol 获取Server的协议

func (*HTTPServer) GetReportClients

func (h *HTTPServer) GetReportClients(req *restful.Request, rsp *restful.Response)

func (*HTTPServer) GetServerConnStats

func (h *HTTPServer) GetServerConnStats(req *restful.Request, rsp *restful.Response)

GetServerConnStats 获取连接缓存里面的统计信息

func (*HTTPServer) GetServerConnections

func (h *HTTPServer) GetServerConnections(req *restful.Request, rsp *restful.Response)

GetServerConnections 查看server的连接数 query参数:protocol,必须,查看指定协议server

host,可选,查看指定host

func (*HTTPServer) GetStrategies

func (h *HTTPServer) GetStrategies(req *restful.Request, rsp *restful.Response)

GetStrategies 批量获取鉴权策略

func (*HTTPServer) GetStrategy

func (h *HTTPServer) GetStrategy(req *restful.Request, rsp *restful.Response)

GetStrategy 获取鉴权策略详细

func (*HTTPServer) GetUserToken

func (h *HTTPServer) GetUserToken(req *restful.Request, rsp *restful.Response)

GetUserToken 获取这个用户所关联的所有用户组列表信息,支持翻页

func (*HTTPServer) GetUsers

func (h *HTTPServer) GetUsers(req *restful.Request, rsp *restful.Response)

GetUsers 查询用户

func (*HTTPServer) Initialize

func (h *HTTPServer) Initialize(_ context.Context, option map[string]interface{},
	apiConf map[string]apiserver.APIConfig) error

Initialize 初始化HTTP API服务器

func (*HTTPServer) Login

func (h *HTTPServer) Login(req *restful.Request, rsp *restful.Response)

Login 登录函数

func (*HTTPServer) PublishConfigFile

func (h *HTTPServer) PublishConfigFile(req *restful.Request, rsp *restful.Response)

PublishConfigFile 发布配置文件

func (*HTTPServer) QueryConfigFileGroups

func (h *HTTPServer) QueryConfigFileGroups(req *restful.Request, rsp *restful.Response)

QueryConfigFileGroups 查询配置文件组,group 模糊搜索

func (*HTTPServer) QueryConfigFilesByGroup

func (h *HTTPServer) QueryConfigFilesByGroup(req *restful.Request, rsp *restful.Response)

func (*HTTPServer) ResetGroupToken

func (h *HTTPServer) ResetGroupToken(req *restful.Request, rsp *restful.Response)

ResetGroupToken 重置用户组 token

func (*HTTPServer) ResetUserToken

func (h *HTTPServer) ResetUserToken(req *restful.Request, rsp *restful.Response)

ResetUserToken 重置用户 token

func (*HTTPServer) Restart

func (h *HTTPServer) Restart(option map[string]interface{}, apiConf map[string]apiserver.APIConfig,
	errCh chan error) error

Restart restart server

func (*HTTPServer) Run

func (h *HTTPServer) Run(errCh chan error)

Run 启动HTTP API服务器

func (*HTTPServer) SearchConfigFile

func (h *HTTPServer) SearchConfigFile(req *restful.Request, rsp *restful.Response)

SearchConfigFile 按照 group 和 name 模糊搜索配置文件,按照 tag 搜索,多个tag之间或的关系

func (*HTTPServer) SetLogOutputLevel

func (h *HTTPServer) SetLogOutputLevel(req *restful.Request, rsp *restful.Response)

SetLogOutputLevel 设置日志输出级别

func (*HTTPServer) Stop

func (h *HTTPServer) Stop()

Stop shutdown server

func (*HTTPServer) StopConfigServer

func (h *HTTPServer) StopConfigServer()

StopConfigServer 停止配置中心模块

func (*HTTPServer) UpdateConfigFile

func (h *HTTPServer) UpdateConfigFile(req *restful.Request, rsp *restful.Response)

UpdateConfigFile 更新配置文件

func (*HTTPServer) UpdateConfigFileGroup

func (h *HTTPServer) UpdateConfigFileGroup(req *restful.Request, rsp *restful.Response)

UpdateConfigFileGroup 更新配置文件组,只能更新 comment

func (*HTTPServer) UpdateGroupToken

func (h *HTTPServer) UpdateGroupToken(req *restful.Request, rsp *restful.Response)

UpdateGroupToken 更新用户组 token

func (*HTTPServer) UpdateGroups

func (h *HTTPServer) UpdateGroups(req *restful.Request, rsp *restful.Response)

UpdateGroups 更新用户组

func (*HTTPServer) UpdateStrategies

func (h *HTTPServer) UpdateStrategies(req *restful.Request, rsp *restful.Response)

UpdateStrategies 更新鉴权策略

func (*HTTPServer) UpdateUser

func (h *HTTPServer) UpdateUser(req *restful.Request, rsp *restful.Response)

UpdateUser 更新用户

func (*HTTPServer) UpdateUserPassword

func (h *HTTPServer) UpdateUserPassword(req *restful.Request, rsp *restful.Response)

UpdateUserPassword 更新用户

func (*HTTPServer) UpdateUserToken

func (h *HTTPServer) UpdateUserToken(req *restful.Request, rsp *restful.Response)

UpdateUserToken 更改用户的token

type ModifyGroupArr

type ModifyGroupArr []*api.ModifyUserGroup

ModifyGroupArr 命名空间数组定义

func (*ModifyGroupArr) ProtoMessage

func (*ModifyGroupArr) ProtoMessage()

ProtoMessage return proto message

func (*ModifyGroupArr) Reset

func (m *ModifyGroupArr) Reset()

Reset 清空数组

func (*ModifyGroupArr) String

func (m *ModifyGroupArr) String() string

String return string

type ModifyStrategyArr

type ModifyStrategyArr []*api.ModifyAuthStrategy

ModifyStrategyArr 命名空间数组定义

func (*ModifyStrategyArr) ProtoMessage

func (*ModifyStrategyArr) ProtoMessage()

ProtoMessage return proto message

func (*ModifyStrategyArr) Reset

func (m *ModifyStrategyArr) Reset()

Reset 清空数组

func (*ModifyStrategyArr) String

func (m *ModifyStrategyArr) String() string

String return string

type NamespaceArr

type NamespaceArr []*api.Namespace

NamespaceArr 命名空间数组定义

func (*NamespaceArr) ProtoMessage

func (*NamespaceArr) ProtoMessage()

ProtoMessage return proto message

func (*NamespaceArr) Reset

func (m *NamespaceArr) Reset()

Reset 重置初始化

func (*NamespaceArr) String

func (m *NamespaceArr) String() string

String return string

type PlatformArr

type PlatformArr []*api.Platform

PlatformArr 平台数组定义

func (*PlatformArr) ProtoMessage

func (m *PlatformArr) ProtoMessage()

ProtoMessage proto message

func (*PlatformArr) Reset

func (m *PlatformArr) Reset()

Reset proto reset

func (*PlatformArr) String

func (m *PlatformArr) String() string

String proto string

type ServiceAliasArr

type ServiceAliasArr []*api.ServiceAlias

ServiceAliasArr 服务实例数组定义

func (*ServiceAliasArr) ProtoMessage

func (*ServiceAliasArr) ProtoMessage()

ProtoMessage proto message

func (*ServiceAliasArr) Reset

func (m *ServiceAliasArr) Reset()

Reset reset initialization

func (*ServiceAliasArr) String

func (m *ServiceAliasArr) String() string

String return string

type StrategyArr

type StrategyArr []*api.AuthStrategy

StrategyArr 命名空间数组定义

func (*StrategyArr) ProtoMessage

func (*StrategyArr) ProtoMessage()

ProtoMessage return proto message

func (*StrategyArr) Reset

func (m *StrategyArr) Reset()

Reset 清空数组

func (*StrategyArr) String

func (m *StrategyArr) String() string

String return string

type UserArr

type UserArr []*api.User

UserArr 命名空间数组定义

func (*UserArr) ProtoMessage

func (*UserArr) ProtoMessage()

ProtoMessage return proto message

func (*UserArr) Reset

func (m *UserArr) Reset()

Reset 清空数组

func (*UserArr) String

func (m *UserArr) String() string

String return string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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