project

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.1"

Functions

func BytesToGibibytes

func BytesToGibibytes(bytes int) int

func GibibytesToBytes

func GibibytesToBytes(bytes int) int

func Provider

func Provider() *schema.Provider

Provider Projects provider that supports configuration via username+password or a token Supported resources are repos, users, groups, replications, and permissions

Types

type AdminPrivileges

type AdminPrivileges struct {
	ManageMembers   bool `json:"manage_members"`
	ManageResources bool `json:"manage_resources"`
	IndexResources  bool `json:"index_resources"`
}

type Equatable

type Equatable interface {
	util.Identifiable
	Equals(other Equatable) bool
}

type Member

type Member struct {
	Name  string   `json:"name"`
	Roles []string `json:"roles"`
}

Use by both project user and project group, as they shared identical data structure

func (Member) Equals

func (a Member) Equals(b Equatable) bool

func (Member) Id

func (m Member) Id() string

type Membership

type Membership struct {
	Members []Member
}

Use by both project user and project group, as they shared identical data structure

type Project

type Project struct {
	Key                    string          `json:"project_key"`
	DisplayName            string          `json:"display_name"`
	Description            string          `json:"description"`
	AdminPrivileges        AdminPrivileges `json:"admin_privileges"`
	StorageQuota           int             `json:"storage_quota_bytes"`
	SoftLimit              bool            `json:"soft_limit"`
	QuotaEmailNotification bool            `json:"storage_quota_email_notification"`
}

Project GET {{ host }}/access/api/v1/projects/{{prjKey}}/ GET {{ host }}/artifactory/api/repositories/?prjKey={{prjKey}}

func (Project) Id

func (p Project) Id() string

type RepoKey

type RepoKey string

func (RepoKey) Equals

func (this RepoKey) Equals(other Equatable) bool

func (RepoKey) Id

func (this RepoKey) Id() string

type Role

type Role struct {
	Name         string   `json:"name"`
	Description  string   `json:"description"`
	Type         string   `json:"type"`
	Environments []string `json:"environments"`
	Actions      []string `json:"actions"`
}

func (Role) Equals

func (a Role) Equals(b Equatable) bool

func (Role) Id

func (r Role) Id() string

type Set added in v1.1.1

type Set[T Equatable] []T

func SetFromSlice added in v1.1.1

func SetFromSlice[T Equatable](values []T) Set[T]

func (Set[T]) Contains added in v1.1.1

func (s Set[T]) Contains(b T) bool

func (Set[T]) Difference added in v1.1.1

func (s Set[T]) Difference(other Set[T]) Set[T]

Difference returns a Set containing all the items not contained in the other set. Note this is "unidirectional", and the result is _only_ the elements in A that are not in B. Example: [1, 2, 3].Difference([2, 3, 4]) = [1].

func (Set[T]) Intersection added in v1.1.1

func (s Set[T]) Intersection(other Set[T]) Set[T]

Intersection returns a Set containing all the common items between both Sets. Example: [1, 2, 3].Intersection([2, 3, 4]) = [2, 3].

Jump to

Keyboard shortcuts

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