workspaces

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 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 CreateWorkspaceRequest

type CreateWorkspaceRequest struct {
	Name         string                           `json:"name"`
	Description  string                           `json:"description"`
	Members      []string                         `json:"members"`
	Repos        []CreateWorkspaceRequestRepoInfo `json:"repos"`
	Contributors []string                         `json:"contributors"`
}

type CreateWorkspaceRequestRepoInfo

type CreateWorkspaceRequestRepoInfo struct {
	FullName string `json:"full_name"`
}

type DbWorkspace

type DbWorkspace struct {
	ID          string              `json:"id"`
	CreatedAt   time.Time           `json:"created_at"`
	UpdatedAt   time.Time           `json:"updated_at"`
	DeletedAt   *time.Time          `json:"deleted_at"`
	Name        string              `json:"name"`
	Description string              `json:"description"`
	IsPublic    bool                `json:"is_public"`
	PayeeUserID *int                `json:"payee_user_id"`
	Members     []DbWorkspaceMember `json:"members"`
}

type DbWorkspaceMember

type DbWorkspaceMember struct {
	ID          string     `json:"id"`
	UserID      int        `json:"user_id"`
	WorkspaceID string     `json:"workspace_id"`
	CreatedAt   time.Time  `json:"created_at"`
	UpdatedAt   time.Time  `json:"updated_at"`
	DeletedAt   *time.Time `json:"deleted_at"`
	Role        string     `json:"role"`
}

type DbWorkspacesResponse

type DbWorkspacesResponse struct {
	Data []DbWorkspace     `json:"data"`
	Meta services.MetaData `json:"meta"`
}

type Service

type Service struct {
	UserListService *userlists.Service
	// contains filtered or unexported fields
}

Service is used to access the "v2/workspaces" endpoints and services. It has a child service UserListService used for accessing workspace contributor insights

func NewWorkspacesService

func NewWorkspacesService(httpClient *http.Client, endpoint string) *Service

NewWorkspacesService returns a new workspace Service

func (*Service) CreateWorkspaceForUser

func (s *Service) CreateWorkspaceForUser(token string, name string, description string, repos []string) (*DbWorkspace, *http.Response, error)

CreateWorkspaceForUser calls the "POST v2/workspaces" endpoint for the authenticated user

func (*Service) GetWorkspaces

func (s *Service) GetWorkspaces(token string, page, limit int) (*DbWorkspacesResponse, *http.Response, error)

GetWorkspaces calls the "GET v2/workspaces" endpoint for the authenticated user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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