Documentation
¶
Index ¶
- func ActivateWorkSession(ac *client.AlpaconClient, id string) error
- func ApproveWorkSession(ac *client.AlpaconClient, id string, req WorkSessionApproveRequest) error
- func CompleteWorkSession(ac *client.AlpaconClient, id string) error
- func ExtendWorkSession(ac *client.AlpaconClient, id string, req WorkSessionExtendRequest) error
- func GetWorkSessionRaw(ac *client.AlpaconClient, id string) ([]byte, error)
- func RejectWorkSession(ac *client.AlpaconClient, id string) error
- func RevokeWorkSession(ac *client.AlpaconClient, id string) error
- type WorkSession
- type WorkSessionApproveRequest
- type WorkSessionAttributes
- type WorkSessionCreateRequest
- type WorkSessionExtendRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateWorkSession ¶
func ActivateWorkSession(ac *client.AlpaconClient, id string) error
func ApproveWorkSession ¶
func ApproveWorkSession(ac *client.AlpaconClient, id string, req WorkSessionApproveRequest) error
func CompleteWorkSession ¶
func CompleteWorkSession(ac *client.AlpaconClient, id string) error
func ExtendWorkSession ¶
func ExtendWorkSession(ac *client.AlpaconClient, id string, req WorkSessionExtendRequest) error
func GetWorkSessionRaw ¶
func GetWorkSessionRaw(ac *client.AlpaconClient, id string) ([]byte, error)
func RejectWorkSession ¶
func RejectWorkSession(ac *client.AlpaconClient, id string) error
func RevokeWorkSession ¶
func RevokeWorkSession(ac *client.AlpaconClient, id string) error
Types ¶
type WorkSession ¶
type WorkSession struct {
ID string `json:"id"`
Description string `json:"description"`
Status string `json:"status"`
RequesterType string `json:"requester_type"`
Scopes []string `json:"scopes"`
Servers []types.ServerSummary `json:"servers"`
CreatedBy *types.UserSummary `json:"created_by"`
AssignedUser *types.UserSummary `json:"assigned_user"`
ExpiresAt time.Time `json:"expires_at"`
StartedAt *time.Time `json:"started_at"`
CompletedAt *time.Time `json:"completed_at"`
AddedAt time.Time `json:"added_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func CreateWorkSession ¶
func CreateWorkSession(ac *client.AlpaconClient, req WorkSessionCreateRequest) (*WorkSession, error)
func GetWorkSession ¶
func GetWorkSession(ac *client.AlpaconClient, id string) (*WorkSession, error)
type WorkSessionAttributes ¶
type WorkSessionAttributes struct {
// Active is the active-session marker ("*" for the workspace's active session, empty otherwise).
// Decorated by cmd/worksession.MarkActive; hidden from JSON output via the "-" tag.
Active string `json:"-" table:"Active"`
ID string `json:"id" table:"ID"`
Status string `json:"status" table:"Status"`
Scopes string `json:"scopes" table:"Scopes"`
Servers string `json:"servers" table:"Servers"`
ExpiresAt string `json:"expires_at" table:"Expires At"`
Description string `json:"description" table:"Description"`
}
func GetWorkSessionList ¶
func GetWorkSessionList(ac *client.AlpaconClient, status, requesterType string) ([]WorkSessionAttributes, error)
func ProjectAttributes ¶
func ProjectAttributes(ws *WorkSession) WorkSessionAttributes
ProjectAttributes converts a full WorkSession into the WorkSessionAttributes shape used by table outputs (ls, current). Single source of truth for column projection.
type WorkSessionExtendRequest ¶
type WorkSessionExtendRequest struct {
ExpiresAt string `json:"expires_at"`
}
Click to show internal directories.
Click to hide internal directories.