cli

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version Makefile LDFLAGS로 주입됨

Functions

func AddForceFlag

func AddForceFlag(cmd *cobra.Command)

AddForceFlag 명령에 --force 로컬 플래그를 등록하는 헬퍼

func Execute

func Execute() error

Execute 루트 명령 실행

func GetClient

func GetClient() *api.Client

GetClient config에서 키를 로드하여 API 클라이언트 반환 설정 로드 실패 시 빈 키로 클라이언트를 반환 (Quotation API 등 인증 불필요 경로 허용)

func GetClientE

func GetClientE(requireAuth bool) (*api.Client, error)

GetClientE config에서 키를 로드하여 API 클라이언트와 에러를 반환 requireAuth가 true이면 키 누락 시 조기 에러 반환

func GetForce

func GetForce() bool

GetForce cmd에서 --force 플래그 값 반환 (로컬 플래그)

func GetFormatter

func GetFormatter() output.Formatter

GetFormatter 현재 플래그 값으로 출력 포맷터 반환

func GetFormatterWithColumns

func GetFormatterWithColumns(columns []output.TableColumn) output.Formatter

GetFormatterWithColumns 현재 플래그 값과 컬럼 정의로 출력 포맷터 반환 테이블 출력 시 지정된 컬럼만 표시, JSON/CSV는 전체 데이터 유지

func RequireArgs

func RequireArgs(n int, usage string) cobra.PositionalArgs

RequireArgs 정확히 n개의 인자를 요구하는 커스텀 Args 함수

func RequireMinArgs

func RequireMinArgs(n int, usage string) cobra.PositionalArgs

RequireMinArgs 최소 n개의 인자를 요구하는 커스텀 Args 함수

func RootCmd

func RootCmd() *cobra.Command

RootCmd 루트 명령 반환 (서브커맨드 등록용)

Types

type ToolSchema

type ToolSchema struct {
	Name        string              `json:"name"`
	Description string              `json:"description"`
	Parameters  ToolSchemaParams    `json:"parameters"`
	Response    *ToolSchemaResponse `json:"response,omitempty"`
}

ToolSchema tool-schema 출력용 구조체

type ToolSchemaParams

type ToolSchemaParams struct {
	Type       string                        `json:"type"`
	Properties map[string]ToolSchemaProperty `json:"properties,omitempty"`
	Required   []string                      `json:"required,omitempty"`
}

ToolSchemaParams JSON Schema 파라미터 정의

type ToolSchemaProperty

type ToolSchemaProperty struct {
	Type        string              `json:"type"`
	Description string              `json:"description,omitempty"`
	Items       *ToolSchemaProperty `json:"items,omitempty"`
	Default     interface{}         `json:"default,omitempty"`
	Enum        []string            `json:"enum,omitempty"`
}

ToolSchemaProperty 개별 파라미터 속성

type ToolSchemaResponse

type ToolSchemaResponse struct {
	Type        string                        `json:"type"`
	Description string                        `json:"description,omitempty"`
	Items       *ToolSchemaResponseObject     `json:"items,omitempty"`
	Properties  map[string]ToolSchemaProperty `json:"properties,omitempty"`
}

ToolSchemaResponse 응답 스키마 정의

type ToolSchemaResponseObject

type ToolSchemaResponseObject struct {
	Type       string                        `json:"type"`
	Properties map[string]ToolSchemaProperty `json:"properties"`
}

ToolSchemaResponseObject 배열 내 객체 정의

Jump to

Keyboard shortcuts

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