File: types.go

package info (click to toggle)
golang-github-adxgun-registry-auth 0.0~git20200730.8cde180-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 8,080 kB
  • sloc: sh: 5; makefile: 4
file content (33 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package registry

// Option is the registry token authorization server configuration options
type Option struct {
	// an Authorizer implementation to authorize registry users
	Authorizer Authorizer
	// an Authenticator implementation to authenticate registry users
	Authenticator Authenticator
	// a pluggable tokenGenerator
	TokenGenerator TokenGenerator
	// .crt & .key file to sign JWT tokens
	Certfile string
	Keyfile  string
	// token expiration time
	TokenExpiration int64
	// token issuer specified in docker registry configuration file
	TokenIssuer string
}

type TokenOption struct {
	Expire int64
	Issuer string
}

// AuthorizationRequest is the authorization request data
type AuthorizationRequest struct {
	Account string
	Service string
	Type    string
	Name    string
	IP      string
	Actions []string
}