project

package
v0.0.0-...-3301e3d Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	Name            string
	Description     string
	Members         map[string]privilege.Level
	ProjectKey      string
	ServiceAccounts map[string]string
}

Project represents a project in Padl

func NewProject

func NewProject(name, description, creator, projectKey string) *Project

NewProject is the project object constructor

func (*Project) AddUser

func (p *Project) AddUser(email string, priv privilege.Level) error

AddUser adds a user to the project with the specified priv level

func (*Project) ChangeUserPrivilege

func (p *Project) ChangeUserPrivilege(email string, priv privilege.Level) error

ChangeUserPrivilege changes a user's level of privilege on the project

func (*Project) HasServiceAccount

func (p *Project) HasServiceAccount(name string) bool

HasServiceAccount checks whether a project has given service account

func (*Project) HasUser

func (p *Project) HasUser(email string) bool

HasUser checks whether a project has a user as a member

func (*Project) RemoveServiceAccount

func (p *Project) RemoveServiceAccount(name string)

RemoveServiceAccount removes a service account

func (*Project) RemoveUser

func (p *Project) RemoveUser(email string)

RemoveUser removes a user from the project

func (*Project) SetServiceAccount

func (p *Project) SetServiceAccount(name string, keyID string)

SetServiceAccount sets a service account for a project

type Summary

type Summary struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

Summary is a name-description representation of a Project

Jump to

Keyboard shortcuts

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