workspaces

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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