Documentation
¶
Index ¶
- type Padl
- func (p *Padl) AddUserToProject(projectName string, email string, privilegeLvl int) error
- func (p *Padl) CreateProject(name, description string, bits int) (*padlfile.File, error)
- func (p *Padl) CreateServiceAccount(projectName, accountName, pubKeyPEM string) (*payloads.CreateServiceAccountResponse, error)
- func (p *Padl) DecryptSecret(secret, kid string) (string, error)
- func (p *Padl) DeleteProject(projectName string) error
- func (p *Padl) GetProject(name string) (*project.Project, error)
- func (p *Padl) GetProjectKeys(name string) (*payloads.GetProjectKeysReponse, error)
- func (p *Padl) GetPublicKey(kid string) (*kms.PublicKey, error)
- func (p *Padl) ListProjects() (*payloads.ListProjectsResponse, error)
- func (p *Padl) Login(email, password string) (string, error)
- func (p *Padl) Register(email, password, pubKey string) error
- func (p *Padl) RemoveServiceAccount(projectName string, keyName string) error
- func (p *Padl) RemoveUserFromProject(projectName string, email string) error
- func (p *Padl) RotateUserKey(pubPEM string) error
- func (p *Padl) Valid() (*auth.CustomClaims, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Padl ¶
Padl represents a padl API client
func NewPadlClient ¶
NewPadlClient is the constructor for the Client object
func (*Padl) AddUserToProject ¶
AddUserToProject adds another user to a project with given privilege permission
func (*Padl) CreateProject ¶
CreateProject creates a new project and returns a signed padlfile
func (*Padl) CreateServiceAccount ¶
func (p *Padl) CreateServiceAccount(projectName, accountName, pubKeyPEM string) (*payloads.CreateServiceAccountResponse, error)
CreateServiceAccount Creates a new service account
func (*Padl) DecryptSecret ¶
DecryptSecret decrypts and returns a secret in plaintext
func (*Padl) DeleteProject ¶
DeleteProject deletes a project from the padl server falis if the user does not have owner privileges
func (*Padl) GetProject ¶
GetProject gets a project by name if the requesting user has access to it
func (*Padl) GetProjectKeys ¶
func (p *Padl) GetProjectKeys(name string) (*payloads.GetProjectKeysReponse, error)
GetProjectKeys gets a project's list of keys by project name, the request will fail if the authorization token in the client is not for a user in the project
func (*Padl) GetPublicKey ¶
GetPublicKey gets a padl-managed public key from the server
func (*Padl) ListProjects ¶
func (p *Padl) ListProjects() (*payloads.ListProjectsResponse, error)
ListProjects lists the users padl projects
func (*Padl) RemoveServiceAccount ¶
RemoveServiceAccount Removes service account
func (*Padl) RemoveUserFromProject ¶
RemoveUserFromProject removes another user from the project fails if the current user does not have owner privilege or if an owner tries to remove themselves
func (*Padl) RotateUserKey ¶
RotateUserKey rotates the key for a given user