admin

package
v0.0.0-...-8d8ec1c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package admin - Admin API 기능 지원 패키지

Package admin -

Package admin -

Package admin -

Package admin -

Index

Constants

View Source
const (
	// APIBasePath - Admin API 관리용 기본 Path
	APIBasePath = "/apis"
	// GroupBasePath - Group 관리용 기본 Path
	GroupBasePath = APIBasePath + "/group/"
)

Variables

This section is empty.

Functions

func NewOverviewHandler

func NewOverviewHandler(conf *api.Configuration, logger logging.Logger) http.HandlerFunc

NewOverviewHandler - 모든 검증 대상에 대한 상태 검증용 핸들러 구성

func NewStatusHandler

func NewStatusHandler(conf *api.Configuration, logger logging.Logger) http.HandlerFunc

NewStatusHandler - 단일 검증 대상에 대한 상태 검증용 핸들러 구성

func RedirectHTTPS

func RedirectHTTPS(port int) http.HandlerFunc

RedirectHTTPS - HTTP로 전달된 Request를 HTTPS로 전달

func WebServe

func WebServe(urlPrefix string) gin.HandlerFunc

WebServe - Admin Web Serve

Types

type APIHandler

type APIHandler struct {
	Configs *api.Configuration
	// contains filtered or unexported fields
}

APIHandler - Admin API 운영을 위한 REST Handler 정보 형식

func NewAPIHandler

func NewAPIHandler(configurationChan chan<- api.ConfigChangedMessage) *APIHandler

NewAPIHandler - 지정한 Configuration 변경을 설정한 Admin API Handler 인스턴스 생성

func (*APIHandler) AddDefinition

func (ah *APIHandler) AddDefinition() http.HandlerFunc

AddDefinition - Request 정보를 기준으로 Definition 정보 추가

func (*APIHandler) AddGroup

func (ah *APIHandler) AddGroup() http.HandlerFunc

AddGroup - Request 정보를 기준으로 Definition을 관리하기 위한 신규 Group 생성

func (*APIHandler) ApplyGroups

func (ah *APIHandler) ApplyGroups() http.HandlerFunc

ApplyGroups - 관리 중인 Group들의 변경사항 적용 (Persistence)

func (*APIHandler) GetDefinitions

func (ah *APIHandler) GetDefinitions() http.HandlerFunc

GetDefinitions - 전체 Definition 정보 반환

func (*APIHandler) GetGroup

func (ah *APIHandler) GetGroup() http.HandlerFunc

GetGroup - 지정된 Group 정보 반환

func (*APIHandler) RemoveDefinition

func (ah *APIHandler) RemoveDefinition() http.HandlerFunc

RemoveDefinition - Request 정보를 기준으로 Definition 정보 삭제

func (*APIHandler) RemoveGroup

func (ah *APIHandler) RemoveGroup() http.HandlerFunc

RemoveGroup - Request 정보를 기준으로 관리 중인 Group 삭제

func (*APIHandler) UpdateDefinition

func (ah *APIHandler) UpdateDefinition() http.HandlerFunc

UpdateDefinition - Request의 정보를 기준으로 Definition 정보 갱신

type Option

type Option func(*Server)

Option - Admin Server 운영을 위한 옵션 설정 함수 형식

func WithConfigurations

func WithConfigurations(configs *api.Configuration) Option

WithConfigurations - Memory상에 동작하고 있는 Configuration 옵션 설정

func WithCredentials

func WithCredentials(credential *config.CredentialsConfig) Option

WithCredentials - 서비스 사용을 위한 사용자 옵션 설정

func WithLog

func WithLog(log logging.Logger) Option

WithLog - Logging에 사용할 Logger 적용

func WithPort

func WithPort(port int) Option

WithPort - 서비스를 위한 포트 옵션 설정

func WithProfiler

func WithProfiler(enabled, public bool) Option

WithProfiler - Profiler 적용 옵션 설정

func WithTLS

func WithTLS(tls *config.TLSConfig) Option

WithTLS - TLS 옵션 설정

type Server

type Server struct {
	ConfigurationChan chan api.ConfigChangedMessage

	Port        int `mapstructure:"port"`
	Credentials *config.CredentialsConfig
	TLS         *config.TLSConfig
	// contains filtered or unexported fields
}

Server - Admin API Server 관리 정보 형식

func New

func New(opts ...Option) *Server

New - Admin Server 구동

func (*Server) AddRoutes

func (s *Server) AddRoutes(ge *gin.Engine)

AddRoutes - ADMIN Routes 정보 구성

func (*Server) Start

func (s *Server) Start() error

Start - Admin API Server 구동

func (*Server) Stop

func (s *Server) Stop()

Stop - Admin API Server 종료

Directories

Path Synopsis
Package health - Health Check 기능 제공 패키지
Package health - Health Check 기능 제공 패키지
Package response - Admin Response 처리 기능 제공 패키지
Package response - Admin Response 처리 기능 제공 패키지

Jump to

Keyboard shortcuts

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