Documentation
¶
Index ¶
Constants ¶
View Source
const ( SeqGet = "get" SeqPost = "post" SeqPut = "put" SeqDelete = "delete" SeqEmpty = "empty" SeqExists = "exists" SeqState = "state" SeqAuth = "auth" SeqCall = "call" SeqPublish = "publish" SeqResponse = "response" )
sequence 타입 상수
Variables ¶
Functions ¶
Types ¶
type Arg ¶
type Arg struct {
Source string // "request", 변수명, 또는 "" (리터럴)
Field string // "CourseID", "ID" 등
Literal string // "cancelled" 등 (Source가 ""일 때)
}
Arg는 함수 호출 인자다.
type Result ¶
type Result struct {
Type string // "Course", "Reservation" (내부 타입)
Var string // "course", "reservations"
Wrapper string // "Page", "Cursor", "" (제네릭 래퍼)
}
Result는 결과 바인딩이다.
type Sequence ¶
type Sequence struct {
Type string // "get", "post", "put", "delete", "empty", "exists", "state", "auth", "call", "response"
// get/post/put/delete/call 공통: 함수 호출
Package string // "session" (패키지 접두사, 없으면 "")
Model string // "Course.FindByID" 또는 "auth.VerifyPassword"
Args []Arg // 호출 인자
// get/post/call: 대입
Result *Result // 결과 바인딩 (nil이면 대입 없음)
// empty/exists: guard
Target string // "course" 또는 "course.InstructorID"
// state: 상태 전이
DiagramID string // "reservation"
Inputs map[string]string // {status: "reservation.Status"}
Transition string // "cancel"
// publish: 이벤트 발행
Topic string // "order.completed"
Options map[string]string // {delay: "1800"} (선택)
// auth: 권한 검사
Action string // "delete"
Resource string // "project"
// response: 필드 매핑
Fields map[string]string // {course: "course", instructor_name: "instructor.Name"}
// 공통
Message string // 에러 메시지
ErrStatus int // 에러 HTTP 상태 코드 (0이면 타입별 기본값: @call→500, @empty→404, @exists→409, @state→409, @auth→403)
SuppressWarn bool // @type! — WARNING 억제
}
Sequence는 하나의 시퀀스 라인이다.
type ServiceFunc ¶
type ServiceFunc struct {
Name string // 함수명 (e.g. "GetCourse")
FileName string // 원본 파일명
Domain string // 도메인 폴더명 (e.g. "auth", 없으면 "")
Sequences []Sequence // 시퀀스 목록
Imports []string // Go import 경로
Subscribe *SubscribeInfo // nil이면 HTTP 트리거
Param *ParamInfo // 함수 파라미터 (subscribe 함수용)
Structs []StructInfo // .ssac 파일에 선언된 Go struct 목록
}
ServiceFunc는 하나의 서비스 함수 선언이다.
func ParseDir ¶
func ParseDir(dir string) ([]ServiceFunc, error)
ParseDir은 디렉토리 내 모든 .ssac 파일을 재귀 탐색하여 []ServiceFunc를 반환한다.
func ParseFile ¶
func ParseFile(path string) ([]ServiceFunc, error)
ParseFile은 단일 .ssac 파일을 파싱하여 []ServiceFunc를 반환한다.
type StructField ¶
StructField는 struct 필드 정보다.
type StructInfo ¶
type StructInfo struct {
Name string // "OnOrderCompletedMessage"
Fields []StructField
}
StructInfo는 .ssac 파일에 선언된 Go struct 정보다.
type SubscribeInfo ¶
type SubscribeInfo struct {
Topic string // "order.completed"
MessageType string // "OnOrderCompletedMessage"
}
SubscribeInfo는 큐 구독 트리거 정보다.
Source Files
¶
- arg.go
- build_subscribe_info.go
- collect_func_comments.go
- collect_imports.go
- collect_structs.go
- collect_structs_from_decl.go
- comment_parser.go
- expr_to_string.go
- extract_inputs.go
- extract_param_info.go
- extract_quoted.go
- extract_struct_info.go
- filter_subscribe.go
- handle_response_line.go
- is_literal.go
- param_info.go
- parse_annotation.go
- parse_arg.go
- parse_args.go
- parse_auth.go
- parse_call.go
- parse_call_expr.go
- parse_call_expr_inputs.go
- parse_comments.go
- parse_crud.go
- parse_crud_with_result.go
- parse_dir.go
- parse_dir_entry.go
- parse_file.go
- parse_func_decl.go
- parse_guard.go
- parse_inputs.go
- parse_line.go
- parse_publish.go
- parse_response_fields.go
- parse_response_line.go
- parse_result.go
- parse_state.go
- parse_two_quoted.go
- process_comment_line.go
- process_response_body.go
- result.go
- seq_const.go
- sequence.go
- service_func.go
- split_package_prefix.go
- split_target_message.go
- struct_field.go
- struct_info.go
- subscribe_info.go
Click to show internal directories.
Click to hide internal directories.