v2

package
v3.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PERM_READ     = "read"
	PERM_WRITE    = "write"
	PERM_ANNOTATE = "annotate"
	PERM_DELETE   = "delete"
	PERM_MANAGE   = "manage"

	PERMISSION_SCHEMA = "application/vnd.org.jfrog.artifactory.security.PermissionTargetV2+json"
)

read, write, annotate, delete, manage

Variables

This section is empty.

Functions

func String

func String(v string) *string

Types

type Entity

type Entity struct {
	Users  *map[string][]string `json:"users,omitempty"`
	Groups *map[string][]string `json:"groups,omitempty"`
}

type Permission

type Permission struct {
	IncludePatterns *[]string `json:"include-patterns,omitempty"`
	ExcludePatterns *[]string `json:"exclude-patterns,omitempty"`
	Repositories    *[]string `json:"repositories,omitempty"`
	Actions         *Entity   `json:"actions,omitempty"`
}

type PermissionTarget

type PermissionTarget struct {
	Name  *string     `json:"name,omitempty"` // Optional element in create/replace queries
	Repo  *Permission `json:"repo,omitempty"`
	Build *Permission `json:"build,omitempty"`
}

func (PermissionTarget) String

func (r PermissionTarget) String() string

type PermissionTargetDetails

type PermissionTargetDetails struct {
	Name *string `json:"name,omitempty"`
	Uri  *string `json:"uri,omitempty"`
}

func (PermissionTargetDetails) String

func (r PermissionTargetDetails) String() string

type SecurityService

type SecurityService Service

func (*SecurityService) CreatePermissionTarget

func (s *SecurityService) CreatePermissionTarget(ctx context.Context, permissionName string, permissionTargets *PermissionTarget) (*resty.Response, error)

func (*SecurityService) DeletePermissionTarget

func (s *SecurityService) DeletePermissionTarget(ctx context.Context, permissionName string) (*resty.Response, error)

func (*SecurityService) GetPermissionTarget

func (s *SecurityService) GetPermissionTarget(ctx context.Context, permissionName string) (*PermissionTarget, *resty.Response, error)

func (*SecurityService) HasPermissionTarget

func (s *SecurityService) HasPermissionTarget(ctx context.Context, permissionName string) (*resty.Response, error)

func (*SecurityService) ListPermissionTargets

func (s *SecurityService) ListPermissionTargets(ctx context.Context) (*[]PermissionTargetDetails, *resty.Response, error)

func (*SecurityService) UpdatePermissionTarget

func (s *SecurityService) UpdatePermissionTarget(ctx context.Context, permissionName string, permissionTargets *PermissionTarget) (*resty.Response, error)

Missing permission target values will be set to the default values as defined by the consumed type. The values defined in the request payload will replace what currently exists in the permission target entity. In case the request is missing one of the permission target entities (repo/build), the entity will be deleted. This means that if an update request is sent to an entity that contains both repo and build, with only repo, the build values will be removed from the entity.

type Service

type Service struct {
	// contains filtered or unexported fields
}

type V2

type V2 struct {
	Security *SecurityService
	// contains filtered or unexported fields
}

func NewV2

func NewV2(client *resty.Client) *V2

Jump to

Keyboard shortcuts

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