Documentation
¶
Index ¶
- func SetService(svc Service)
- type CreateOptions
- type DefaultService
- func (*DefaultService) Create(ctx context.ServiceContext, client *clients.GQLClient, options *CreateOptions) (*Project, error)
- func (*DefaultService) Delete(ctx context.ServiceContext, client *clients.GQLClient, id string) error
- func (*DefaultService) Get(ctx context.ServiceContext, client *clients.GQLClient, id string) (*Project, error)
- func (*DefaultService) GetOrganisation(ctx context.ServiceContext, client *clients.GQLClient, id string) (*organisations.Organisation, error)
- func (*DefaultService) List(ctx context.ServiceContext, client *clients.GQLClient, options *ListOptions) ([]*Project, error)
- func (*DefaultService) Update(ctx context.ServiceContext, client *clients.GQLClient, id string, ...) (*Project, error)
- type ListOptions
- type Project
- type Service
- type UpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetService ¶ added in v1.1.7
func SetService(svc Service)
Types ¶
type CreateOptions ¶
type DefaultService ¶ added in v1.1.7
type DefaultService struct{}
func (*DefaultService) Create ¶ added in v1.1.7
func (*DefaultService) Create(ctx context.ServiceContext, client *clients.GQLClient, options *CreateOptions) (*Project, error)
Create a new project
func (*DefaultService) Delete ¶ added in v1.1.7
func (*DefaultService) Delete(ctx context.ServiceContext, client *clients.GQLClient, id string) error
Delete a project by ID
func (*DefaultService) Get ¶ added in v1.1.7
func (*DefaultService) Get(ctx context.ServiceContext, client *clients.GQLClient, id string) (*Project, error)
Get a project by ID
func (*DefaultService) GetOrganisation ¶ added in v1.1.11
func (*DefaultService) GetOrganisation(ctx context.ServiceContext, client *clients.GQLClient, id string) (*organisations.Organisation, error)
Get an organisation by it's project ID
func (*DefaultService) List ¶ added in v1.1.7
func (*DefaultService) List(ctx context.ServiceContext, client *clients.GQLClient, options *ListOptions) ([]*Project, error)
List projects
func (*DefaultService) Update ¶ added in v1.1.7
func (*DefaultService) Update(ctx context.ServiceContext, client *clients.GQLClient, id string, options *UpdateOptions) (*Project, error)
Update a project by ID
type ListOptions ¶
type ListOptions struct {
OrgID string `json:"org_id"`
}
type Project ¶
type Project struct {
ID string `json:"id"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
Name string `json:"name,omitempty"`
OrgID string `json:"org_id,omitempty"`
Organisation organisations.Organisation `json:"organisation,omitempty"`
UserID string `json:"user_id"`
}
type Service ¶ added in v1.1.7
type Service interface {
Get(context.ServiceContext, *clients.GQLClient, string) (*Project, error)
GetOrganisation(context.ServiceContext, *clients.GQLClient, string) (*organisations.Organisation, error)
Create(context.ServiceContext, *clients.GQLClient, *CreateOptions) (*Project, error)
List(context.ServiceContext, *clients.GQLClient, *ListOptions) ([]*Project, error)
Update(context.ServiceContext, *clients.GQLClient, string, *UpdateOptions) (*Project, error)
Delete(context.ServiceContext, *clients.GQLClient, string) error
}
func GetService ¶ added in v1.1.7
func GetService() Service
type UpdateOptions ¶
type UpdateOptions struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.