approval

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Approval

type Approval struct {
	ID              string                 `json:"id"`
	CreatedAt       string                 `json:"created_at"`
	UpdatedAt       string                 `json:"updated_at"`
	Actor           string                 `json:"actor"`
	FunctionID      string                 `json:"function_id"`
	GameID          string                 `json:"game_id"`
	Env             string                 `json:"env"`
	State           string                 `json:"state"`
	Mode            string                 `json:"mode"`
	Route           string                 `json:"route,omitempty"`
	IdempotencyKey  string                 `json:"idempotency_key,omitempty"`
	TargetServiceID string                 `json:"target_service_id,omitempty"`
	HashKey         string                 `json:"hash_key,omitempty"`
	Reason          string                 `json:"reason,omitempty"`
	Payload         map[string]interface{} `json:"payload,omitempty"`
	PayloadPreview  string                 `json:"payload_preview,omitempty"`
}

Approval represents an approval (for response)

type ApprovalApproveRequest

type ApprovalApproveRequest struct {
	ID string `uri:"id"`
}

ApprovalApproveRequest represents the request to approve an approval

type ApprovalApproveResponse

type ApprovalApproveResponse struct {
	ID    string `json:"id"`
	State string `json:"state"`
}

ApprovalApproveResponse represents the response after approving

type ApprovalDetail

type ApprovalDetail struct {
	ApprovalSummary
	Payload        map[string]interface{} `json:"payload,omitempty"`
	PayloadPreview string                 `json:"payload_preview,omitempty"`
}

ApprovalDetail represents an approval detail

type ApprovalGetRequest

type ApprovalGetRequest struct {
	ID string `uri:"id"`
}

ApprovalGetRequest represents the request to get approval details

type ApprovalGetResponse

type ApprovalGetResponse struct {
	Approval
}

ApprovalGetResponse represents the response with approval details

type ApprovalRejectRequest

type ApprovalRejectRequest struct {
	ID     string `uri:"id"`
	Reason string `json:"reason"`
}

ApprovalRejectRequest represents the request to reject an approval

type ApprovalRejectResponse

type ApprovalRejectResponse struct {
	ID     string `json:"id"`
	State  string `json:"state"`
	Reason string `json:"reason"`
}

ApprovalRejectResponse represents the response after rejecting

type ApprovalSummary

type ApprovalSummary struct {
	ID              string `json:"id"`
	CreatedAt       string `json:"created_at"`
	UpdatedAt       string `json:"updated_at"`
	Actor           string `json:"actor"`
	FunctionID      string `json:"function_id"`
	GameID          string `json:"game_id"`
	Env             string `json:"env"`
	State           string `json:"state"`
	Mode            string `json:"mode"`
	Route           string `json:"route,omitempty"`
	IdempotencyKey  string `json:"idempotency_key,omitempty"`
	TargetServiceID string `json:"target_service_id,omitempty"`
	HashKey         string `json:"hash_key,omitempty"`
	Reason          string `json:"reason,omitempty"`
}

ApprovalSummary represents an approval summary

type ApprovalsListRequest

type ApprovalsListRequest struct {
	Page     int    `form:"page,optional,default=1"`
	PageSize int    `form:"pageSize,optional,default=20"`
	Status   string `form:"status"`
}

ApprovalsListRequest represents the request to list approvals

type ApprovalsListResponse

type ApprovalsListResponse struct {
	Approvals []ApprovalSummary `json:"approvals"`
	Total     int64             `json:"total"`
	Page      int               `json:"page"`
	Size      int               `json:"size"`
}

ApprovalsListResponse represents the response with a list of approvals

type Handler

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

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) Approve

func (h *Handler) Approve(c *gin.Context)

Approve handles the request to approve an approval

func (*Handler) Get

func (h *Handler) Get(c *gin.Context)

Get handles the request to get approval details

func (*Handler) List

func (h *Handler) List(c *gin.Context)

List handles the request to list approvals

func (*Handler) Reject

func (h *Handler) Reject(c *gin.Context)

Reject handles the request to reject an approval

type Service

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

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) Approve

Approve approves an approval

func (*Service) Get

Get retrieves details of a specific approval

func (*Service) List

List retrieves a paginated list of approvals

func (*Service) Reject

Reject rejects an approval

Jump to

Keyboard shortcuts

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