projects

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.ServiceContext, client *clients.GQLClient, id string) error

Delete a project by ID

func List

func List(ctx context.ServiceContext, client *clients.GQLClient, options *ListOptions) (*[]Project, error)

List projects

Types

type CreateOptions

type CreateOptions struct {
	OrgID string `graphql:"org_id" json:"org_id"`
	Name  string `graphql:"name" json:"name"`
}

type ListOptions

type ListOptions struct {
	OrgID string `graphql:"org_id" json:"org_id"`
}

type Project

type Project struct {
	ID        string    `json:"id" graphql:"id"`
	CreatedAt time.Time `json:"created_at,omitempty" graphql:"created_at"`
	UpdatedAt time.Time `json:"updated_at,omitempty" graphql:"updated_at"`
	Name      string    `json:"name,omitempty" graphql:"name"`
	OrgID     string    `json:"org_id,omitempty" graphql:"org_id"`
	UserID    string    `json:"user_id"`
}

func Create

func Create(ctx context.ServiceContext, client *clients.GQLClient, options *CreateOptions) (*Project, error)

Create a new workspace

func Get

func Get(ctx context.ServiceContext, client *clients.GQLClient, id string) (*Project, error)

Get a workspace by ID

func Update

func Update(ctx context.ServiceContext, client *clients.GQLClient, id string, options *UpdateOptions) (*Project, error)

Update a workspace by ID

func (*Project) Marshal

func (w *Project) Marshal() ([]byte, error)

func (*Project) Unmarshal

func (w *Project) Unmarshal(data []byte) error

type UpdateOptions

type UpdateOptions struct {
	Name string `json:"name" graphql:"name"`
}

Jump to

Keyboard shortcuts

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