api

package
v0.0.0-...-c4cb933 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message string `json:"error"`
}

APIError represents an error returned by the API.

func (*APIError) Error

func (e *APIError) Error() string

type AdminChangePasswordRequest

type AdminChangePasswordRequest struct {
	CurrentPassword *string `json:"currentPassword,omitempty"`
	NewPassword     *string `json:"newPassword,omitempty"`
}

type AdminChangePasswordResponse

type AdminChangePasswordResponse struct {
	Success bool `json:"success"`
}

type AdminLoginRequest

type AdminLoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password,omitempty"`
}

type AdminLoginResponse

type AdminLoginResponse struct {
	AccessToken string `json:"accessToken"`
}

type AdminPlanCreateRequest

type AdminPlanCreateRequest struct {
	Name                  string `json:"name"`
	MaxWorkspaces         *int   `json:"maxWorkspaces,omitempty"`
	MaxBoardsPerWorkspace *int   `json:"maxBoardsPerWorkspace,omitempty"`
	MaxMembersPerBoard    *int   `json:"maxMembersPerBoard,omitempty"`
	MaxActiveBoards       *int   `json:"maxActiveBoards,omitempty"`
	IsTrial               *bool  `json:"isTrial,omitempty"`
	IsActive              *bool  `json:"isActive,omitempty"`
}

type AdminPlanUpdateRequest

type AdminPlanUpdateRequest struct {
	Name                  *string `json:"name,omitempty"`
	MaxWorkspaces         *int    `json:"maxWorkspaces,omitempty"`
	MaxBoardsPerWorkspace *int    `json:"maxBoardsPerWorkspace,omitempty"`
	MaxMembersPerBoard    *int    `json:"maxMembersPerBoard,omitempty"`
	MaxActiveBoards       *int    `json:"maxActiveBoards,omitempty"`
	IsTrial               *bool   `json:"isTrial,omitempty"`
	IsActive              *bool   `json:"isActive,omitempty"`
}

type AdminService

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

func (*AdminService) ChangePassword

func (*AdminService) CreatePlan

func (s *AdminService) CreatePlan(req AdminPlanCreateRequest) (*Plan, error)

func (*AdminService) GetBugReports

func (s *AdminService) GetBugReports(page, limit *int, search *string) (*BugReportsResponse, error)

func (*AdminService) GetPlans

func (s *AdminService) GetPlans() ([]Plan, error)

func (*AdminService) GetUsers

func (s *AdminService) GetUsers() ([]AdminUser, error)

func (*AdminService) Login

func (*AdminService) UpdatePlan

func (s *AdminService) UpdatePlan(id string, req AdminPlanUpdateRequest) (*Plan, error)

type AdminUser

type AdminUser struct {
	ID             string     `json:"id"`
	Name           *string    `json:"name"`
	Email          *string    `json:"email"`
	CreatedAt      time.Time  `json:"createdAt"`
	WorkspaceCount int        `json:"workspaceCount"`
	BoardCount     int        `json:"boardCount"`
	LastOnline     *time.Time `json:"lastOnline"`
}

type BoardService

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

func (*BoardService) CreateBoard

func (s *BoardService) CreateBoard(req CreateBoardPayload) (interface{}, error)

func (*BoardService) DeleteBoard

func (s *BoardService) DeleteBoard(workspaceName, boardName string) (*GenericMessageResponse, error)

func (*BoardService) GetDeletedBoards

func (s *BoardService) GetDeletedBoards() ([]DeletedBoard, error)

func (*BoardService) InviteMember

func (s *BoardService) InviteMember(workspaceName, boardName, identifier string) (interface{}, error)

func (*BoardService) LeaveBoard

func (s *BoardService) LeaveBoard(workspaceName, boardName string) error

func (*BoardService) RemoveMember

func (s *BoardService) RemoveMember(workspaceName, boardName, identifier string) (*GenericMessageResponse, error)

func (*BoardService) RestoreBoard

func (s *BoardService) RestoreBoard(workspaceName, boardName string) (*GenericMessageResponse, error)

func (*BoardService) UpdateBoardStatus

func (s *BoardService) UpdateBoardStatus(workspaceName, boardName string, isActive bool) (*UpdateBoardStatusResponse, error)

type BugReport

type BugReport struct {
	ID        string    `json:"id"`
	Message   string    `json:"message"`
	Browser   string    `json:"browser"`
	CreatedAt time.Time `json:"createdAt"`
}

type BugReportPayload

type BugReportPayload struct {
	Message string `json:"message"`
	Browser string `json:"browser"`
}

type BugReportResponse

type BugReportResponse struct {
	ID        string `json:"id"`
	Message   string `json:"message"`
	Browser   string `json:"browser"`
	CreatedAt string `json:"createdAt"`
}

type BugReportsResponse

type BugReportsResponse struct {
	Data  []BugReport `json:"data"`
	Total int         `json:"total"`
	Page  int         `json:"page"`
	Limit int         `json:"limit"`
}

type BugService

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

func (*BugService) ReportBug

func (s *BugService) ReportBug(payload BugReportPayload) (*BugReportResponse, error)

type CheckoutPayload

type CheckoutPayload struct {
	PriceID string `json:"priceId"`
}

type CheckoutResponse

type CheckoutResponse struct {
	ApprovalURL string `json:"approvalUrl"`
}

type Client

type Client struct {
	BaseURL    string
	Token      string
	HTTPClient *http.Client

	Admin        *AdminService
	Board        *BoardService
	Bug          *BugService
	Directory    *DirectoryService
	Github       *GithubService
	Notification *NotificationService
	Subscription *SubscriptionService
	Task         *TaskService
	User         *UserService
	Workspace    *WorkspaceService
}

Client represents the Syncoboard API client.

func NewClient

func NewClient(baseURL, token string) *Client

NewClient creates a new API client.

type CreateBoardPayload

type CreateBoardPayload struct {
	WorkspaceName string `json:"workspaceName"`
	Name          string `json:"name"`
	RepoName      string `json:"repoName,omitempty"`
}

type CreateTaskPayload

type CreateTaskPayload struct {
	BoardID string `json:"boardId"`
	Title   string `json:"title"`
}

type CreateWorkspacePayload

type CreateWorkspacePayload struct {
	Name string `json:"name"`
}

type DeletedBoard

type DeletedBoard struct {
	Name           string `json:"name"`
	WorkspaceName  string `json:"workspaceName"`
	RepositoryName string `json:"repositoryName"`
	TimeLeftString string `json:"timeLeftString"`
}

type DirectoryEntry

type DirectoryEntry struct {
	Name   string `json:"name"`
	Type   string `json:"type"`
	ID     string `json:"id,omitempty"`
	Title  string `json:"title,omitempty"`
	Status string `json:"status,omitempty"`
}

type DirectoryResponse

type DirectoryResponse struct {
	Path            string           `json:"path"`
	Type            string           `json:"type"`
	ID              string           `json:"id,omitempty"`
	Entries         []DirectoryEntry `json:"entries"`
	HasMoreByStatus map[string]bool  `json:"hasMoreByStatus,omitempty"`
}

type DirectoryService

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

func (*DirectoryService) GetDirectory

func (s *DirectoryService) GetDirectory(path string) (*DirectoryResponse, error)

type GenericMessageResponse

type GenericMessageResponse struct {
	Message string `json:"message"`
}

type GetReadStateResponse

type GetReadStateResponse struct {
	LastRead *string `json:"lastRead"`
}

type GithubRepo

type GithubRepo struct {
	ID       int64  `json:"id"`
	NodeID   string `json:"node_id"`
	Name     string `json:"name"`
	FullName string `json:"full_name"`
	Private  bool   `json:"private"`
}

type GithubService

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

func (*GithubService) GetRepos

func (s *GithubService) GetRepos(workspaceID *string) ([]GithubRepo, error)

type InviteMemberBody

type InviteMemberBody struct {
	WorkspaceName string `json:"workspaceName"`
	BoardName     string `json:"boardName"`
	Identifier    string `json:"identifier"`
}

type ListTasksResponse

type ListTasksResponse struct {
	TasksByStatus   map[string][]Task `json:"tasksByStatus"`
	HasMoreByStatus map[string]bool   `json:"hasMoreByStatus"`
}

type NotificationActor

type NotificationActor struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type NotificationBoard

type NotificationBoard struct {
	Name      string                 `json:"name"`
	Workspace *NotificationWorkspace `json:"workspace,omitempty"`
}

type NotificationLog

type NotificationLog struct {
	Type      string             `json:"type"`
	CreatedAt time.Time          `json:"createdAt"`
	Actor     *NotificationActor `json:"actor,omitempty"`
	Board     *NotificationBoard `json:"board,omitempty"`
	Task      *NotificationTask  `json:"task,omitempty"`
}

type NotificationService

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

func (*NotificationService) GetNotifications

func (s *NotificationService) GetNotifications() ([]NotificationLog, error)

func (*NotificationService) GetReadState

func (s *NotificationService) GetReadState() (*GetReadStateResponse, error)

func (*NotificationService) MarkAsRead

func (s *NotificationService) MarkAsRead() (*SuccessResponse, error)

type NotificationTask

type NotificationTask struct {
	Title  string `json:"title"`
	Status string `json:"status"`
}

type NotificationWorkspace

type NotificationWorkspace struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Plan

type Plan struct {
	ID                    string    `json:"id"`
	Name                  string    `json:"name"`
	MaxWorkspaces         int       `json:"maxWorkspaces"`
	MaxBoardsPerWorkspace int       `json:"maxBoardsPerWorkspace"`
	MaxMembersPerBoard    int       `json:"maxMembersPerBoard"`
	MaxActiveBoards       int       `json:"maxActiveBoards"`
	IsTrial               bool      `json:"isTrial"`
	IsActive              bool      `json:"isActive"`
	CreatedAt             time.Time `json:"createdAt"`
	UpdatedAt             time.Time `json:"updatedAt"`
}

type Subscription

type Subscription struct {
	ID        string    `json:"id"`
	UserId    string    `json:"userId"`
	PlanId    string    `json:"planId"`
	Status    string    `json:"status"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type SubscriptionService

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

func (*SubscriptionService) Checkout

func (s *SubscriptionService) Checkout(priceID string) (*CheckoutResponse, error)

func (*SubscriptionService) SubscribeToFreePlan

func (s *SubscriptionService) SubscribeToFreePlan() (*Subscription, error)

type SuccessResponse

type SuccessResponse struct {
	Success bool `json:"success"`
}

type Task

type Task struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Status      string `json:"status"`
	Assignees   []User `json:"assignees"`
}

type TaskService

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

func (*TaskService) AddTask

func (s *TaskService) AddTask(payload CreateTaskPayload) (*Task, error)

func (*TaskService) DeleteTask

func (s *TaskService) DeleteTask(taskID string) (*SuccessResponse, error)

func (*TaskService) GetTask

func (s *TaskService) GetTask(taskID string) (*Task, error)

func (*TaskService) ListTasks

func (s *TaskService) ListTasks(workspaceName, boardName string, page, limit int) (*ListTasksResponse, error)

func (*TaskService) UpdateTaskStatus

func (s *TaskService) UpdateTaskStatus(taskID, status string) (*Task, error)

type UpdateBoardStatusBody

type UpdateBoardStatusBody struct {
	WorkspaceName string `json:"workspaceName"`
	BoardName     string `json:"boardName"`
	IsActive      bool   `json:"isActive"`
}

type UpdateBoardStatusResponse

type UpdateBoardStatusResponse struct {
	Message  string `json:"message"`
	IsActive bool   `json:"isActive"`
}

type User

type User struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

type UserService

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

func (*UserService) UpdateLastOnline

func (s *UserService) UpdateLastOnline() error

type Workspace

type Workspace struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type WorkspaceService

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

func (*WorkspaceService) CreateWorkspace

func (s *WorkspaceService) CreateWorkspace(payload CreateWorkspacePayload) (*Workspace, error)

func (*WorkspaceService) DeleteWorkspace

func (s *WorkspaceService) DeleteWorkspace(workspaceName string) (*GenericMessageResponse, error)

func (*WorkspaceService) GetUserWorkspaces

func (s *WorkspaceService) GetUserWorkspaces(includeBoards bool) (interface{}, error)

func (*WorkspaceService) RestoreWorkspace

func (s *WorkspaceService) RestoreWorkspace(workspaceName string) (*GenericMessageResponse, error)

func (*WorkspaceService) UpdateWorkspaceStatus

func (s *WorkspaceService) UpdateWorkspaceStatus(workspaceName string, isActive bool) (*UpdateBoardStatusResponse, error)

type WorkspaceWithBoards

type WorkspaceWithBoards struct {
	Workspace
	Boards []interface{} `json:"boards"`
}

Jump to

Keyboard shortcuts

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