github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/access.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package models 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "context" 10 11 "github.com/go-openapi/strfmt" 12 "github.com/go-openapi/swag" 13 ) 14 15 // Access access 16 // 17 // swagger:model Access 18 type Access struct { 19 20 // The action of the access. Possible actions are *, pull, push, create, read, update, delete, list, operate, scanner-pull and stop. 21 Action string `json:"action,omitempty"` 22 23 // The effect of the access 24 Effect string `json:"effect,omitempty"` 25 26 // The resource of the access. Possible resources are *, artifact, artifact-addition, artifact-label, audit-log, catalog, configuration, distribution, garbage-collection, helm-chart, helm-chart-version, helm-chart-version-label, immutable-tag, label, ldap-user, log, member, metadata, notification-policy, preheat-instance, preheat-policy, project, quota, registry, replication, replication-adapter, replication-policy, repository, robot, scan, scan-all, scanner, system-volumes, tag, tag-retention, user, user-group or "" (for self-reference). 27 Resource string `json:"resource,omitempty"` 28 } 29 30 // Validate validates this access 31 func (m *Access) Validate(formats strfmt.Registry) error { 32 return nil 33 } 34 35 // ContextValidate validates this access based on context it is used 36 func (m *Access) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 37 return nil 38 } 39 40 // MarshalBinary interface implementation 41 func (m *Access) MarshalBinary() ([]byte, error) { 42 if m == nil { 43 return nil, nil 44 } 45 return swag.WriteJSON(m) 46 } 47 48 // UnmarshalBinary interface implementation 49 func (m *Access) UnmarshalBinary(b []byte) error { 50 var res Access 51 if err := swag.ReadJSON(b, &res); err != nil { 52 return err 53 } 54 *m = res 55 return nil 56 }