MCPcopy Create free account

hub / github.com/TimeBye/go-harbor / functions

Functions250 in github.com/TimeBye/go-harbor

↓ 32 callersMethodNewRequest
NewRequest creates an API request. A relative URL path can be provided in urlStr, in which case it is resolved relative to the base URL of the Client.
harbor.go:85
↓ 32 callersMethodNow
()
pkg/rest/util/flowcontrol/throttle.go:57
↓ 26 callersMethodStep
Move clock by Duration, notify anyone that's called After, Tick, or NewTimer
pkg/rest/util/clock/clock.go:178
↓ 24 callersMethodC
()
pkg/rest/util/clock/clock.go:276
↓ 20 callersMethodGet
()
pkg/rest/client.go:31
↓ 14 callersMethodError
()
pkg/rest/request.go:711
↓ 14 callersMethodResource
Resource sets the resource to access (<resource>/[ns/<namespace>/]<name>)
pkg/rest/request.go:364
↓ 13 callersMethodDo
(req *http.Request)
pkg/rest/request.go:48
↓ 13 callersMethodName
Name sets the name of a resource to access (<resource>/[ns/<namespace>/]<name>)
pkg/rest/request.go:377
↓ 13 callersMethodNow
()
pkg/rest/util/clock/clock.go:28
↓ 9 callersMethodProject
()
pkg/client/clientset.go:27
↓ 8 callersMethodInto
Into stores the result into obj, if possible. If obj is nil it is ignored. If the returned object is of type Status and has .Status != StatusSuccess,
pkg/rest/request.go:700
↓ 8 callersMethodQuery
(content interface{})
pkg/rest/request.go:726
↓ 8 callersMethodURL
URL returns the current working URL.
pkg/rest/request.go:315
↓ 7 callersMethodNext
move backoff to the next mark, capping at maxDuration
pkg/rest/util/flowcontrol/backoff.go:70
↓ 7 callersMethodTryAccept
TryAccept returns true if a token is taken immediately. Otherwise, it returns false.
pkg/rest/util/flowcontrol/throttle.go:30
↓ 6 callersMethodAccept
Accept returns once a token becomes available.
pkg/rest/util/flowcontrol/throttle.go:32
↓ 6 callersMethodDelete
()
pkg/rest/client.go:32
↓ 6 callersMethodHasWaiters
Returns true if After has been called on f but not yet satisfied (so you can write race-free tests).
pkg/rest/util/clock/clock.go:224
↓ 6 callersMethodRepositories
(project string)
pkg/project/project.go:72
↓ 5 callersMethodList
()
pkg/rest/client.go:30
↓ 5 callersFunctionNewFakeBackOff
(initial, max time.Duration, tc *clock2.FakeClock)
pkg/rest/util/flowcontrol/backoff.go:39
↓ 5 callersFunctionNewFakeClock
(t time.Time)
pkg/rest/util/clock/clock.go:103
↓ 5 callersMethodSetHeader
(key string, values ...string)
pkg/rest/request.go:178
↓ 5 callersMethodSleep
(time.Duration)
pkg/rest/util/flowcontrol/throttle.go:58
↓ 5 callersMethodVerb
Verb begins a request with a verb (GET, POST, PUT, DELETE). Example usage of RESTClient's request building interface: c, err := NewRESTClient(...) if
pkg/rest/client.go:130
↓ 4 callersFunctionNewRequest
NewRequest creates a new request helper object for accessing runtime.Objects on a server.
pkg/rest/request.go:120
↓ 4 callersFunctionNewTokenBucketRateLimiter
NewTokenBucketRateLimiter creates a rate limiter which implements a token bucket approach. The rate limiter allows bursts of up to 'burst' to exceed t
pkg/rest/util/flowcontrol/throttle.go:50
↓ 4 callersMethodParam
Param creates a query parameter with the given string value.
pkg/rest/request.go:255
↓ 4 callersMethodParams
(o interface{})
pkg/rest/request.go:722
↓ 4 callersMethodReset
(d time.Duration)
pkg/rest/util/clock/clock.go:278
↓ 4 callersMethodSince
(time.Time)
pkg/rest/util/clock/clock.go:29
↓ 4 callersMethodStop
()
pkg/rest/util/clock/clock.go:277
↓ 4 callersMethodSuffix
Suffix appends segments to the end of the path. These items will be placed after the prefix and optional Namespace, Resource, or Name sections.
pkg/rest/request.go:162
↓ 4 callersFunctionglogBody
glogBody logs a body output that could be either JSON or protobuf. It explicitly guards against allocating a new string for the body output unless nec
pkg/rest/request.go:288
↓ 4 callersMethodsetParam
(paramName, value string)
pkg/rest/request.go:170
↓ 3 callersMethodAbsPath
AbsPath overwrites an existing path with the segments provided. Trailing slashes are preserved when a single segment is passed.
pkg/rest/request.go:302
↓ 3 callersMethodAfter
(time.Duration)
pkg/rest/util/clock/clock.go:36
↓ 3 callersMethodAfter
Fake version of time.After(d).
pkg/rest/util/clock/clock.go:131
↓ 3 callersMethodArtifacts
(Repository string)
pkg/project/repository.go:25
↓ 3 callersMethodBody
Body makes the request use obj as the body. Optional. If obj is a string, try to read a file of that name. If obj is a []byte, send it directly. If ob
pkg/rest/request.go:206
↓ 3 callersMethodGet
(name string)
pkg/project/artifacts.go:26
↓ 3 callersMethodNewTicker
(d time.Duration)
pkg/rest/util/clock/clock.go:160
↓ 3 callersMethodNewTimer
Fake version of time.NewTimer(d).
pkg/rest/util/clock/clock.go:144
↓ 3 callersFunctionhasExpired
After 2*maxDuration we restart the backoff factor to the beginning
pkg/rest/util/flowcontrol/backoff.go:146
↓ 3 callersMethodtryThrottle
()
pkg/rest/request.go:393
↓ 2 callersMethodDelete
(name string)
pkg/project/artifacts.go:27
↓ 2 callersMethodGC
Garbage collect records that have aged past maxDuration. Backoff users are expected to invoke this periodically.
pkg/rest/util/flowcontrol/backoff.go:120
↓ 2 callersMethodGet
(name string)
pkg/project/repository.go:27
↓ 2 callersMethodIsInBackOffSince
Returns True if the elapsed time since eventTime is smaller than the current backoff window
pkg/rest/util/flowcontrol/backoff.go:91
↓ 2 callersMethodIsInBackOffSinceUpdate
Returns True if time since lastupdate is less than the current backoff window.
pkg/rest/util/flowcontrol/backoff.go:105
↓ 2 callersFunctionNewFakePassiveClock
(t time.Time)
pkg/rest/util/clock/clock.go:97
↓ 2 callersMethodSetTime
(time.Time)
pkg/rest/util/clock/clock_test.go:38
↓ 2 callersMethodSetTime
Sets the time.
pkg/rest/util/clock/clock.go:185
↓ 2 callersMethodWait
(ctx context.Context)
pkg/rest/util/flowcontrol/throttle.go:104
↓ 2 callersFunctionexercisePassiveClock
(t *testing.T, pc SettablePassiveClock)
pkg/rest/util/clock/clock_test.go:41
↓ 2 callersFunctionnewTokenBucketRateLimiter
(limiter *rate.Limiter, c Clock, qps float32)
pkg/rest/util/flowcontrol/throttle.go:77
↓ 2 callersMethodnewUnstructuredResponseError
newUnstructuredResponseError instantiates the appropriate generic error for the provided input. It also logs the body.
pkg/rest/request.go:603
↓ 2 callersMethodqueryStruct
(content interface{})
pkg/rest/request.go:762
↓ 2 callersMethodrequest
request connects to the server and invokes the provided function when a server response is received. It handles retry behavior and up front validation
pkg/rest/request.go:435
↓ 2 callersMethodsetTimeLocked
Actually changes the time and checks any waiters. f must be write-locked.
pkg/rest/util/clock/clock.go:192
↓ 2 callersFunctiontruncateBody
truncateBody decides if the body should be truncated, based on the glog Verbosity.
pkg/rest/request.go:679
↓ 1 callersMethodDeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
pkg/rest/zz_generated.deepcopy.go:24
↓ 1 callersFunctionDefaultServerURL
DefaultServerURL converts a host, host:port, or URL string to the default base server API path to use with a Client at a given API version following t
pkg/rest/url_utils.go:26
↓ 1 callersMethodDelete
(name string)
pkg/project/repository.go:28
↓ 1 callersFunctionInt32Max
(a, b int32)
pkg/rest/util/integer/integer.go:33
↓ 1 callersFunctionInt32Min
(a, b int32)
pkg/rest/util/integer/integer.go:40
↓ 1 callersFunctionInt64Max
(a, b int64)
pkg/rest/util/integer/integer.go:47
↓ 1 callersFunctionInt64Min
(a, b int64)
pkg/rest/util/integer/integer.go:54
↓ 1 callersFunctionIntMax
(a, b int)
pkg/rest/util/integer/integer.go:19
↓ 1 callersFunctionIntMin
(a, b int)
pkg/rest/util/integer/integer.go:26
↓ 1 callersMethodList
(query *options.ArtifactsListOptions)
pkg/project/artifacts.go:28
↓ 1 callersFunctionNewDefaultConfig
(host string, username string, password string)
pkg/rest/config.go:194
↓ 1 callersFunctionNewFakeAlwaysRateLimiter
()
pkg/rest/util/flowcontrol/throttle.go:108
↓ 1 callersFunctionNewFakeNeverRateLimiter
()
pkg/rest/util/flowcontrol/throttle.go:128
↓ 1 callersFunctionNewRESTClient
NewRESTClient creates a new RESTClient. This client performs generic REST functions such as Get, Put, Post, and Delete on specified paths. Codec cont
pkg/rest/client.go:72
↓ 1 callersMethodNewTicker
(time.Duration)
pkg/rest/util/clock/clock.go:39
↓ 1 callersMethodNewTimer
(time.Duration)
pkg/rest/util/clock/clock.go:37
↓ 1 callersFunctionNewUsersClient
(restClient *rest2.Config)
pkg/user/user.go:33
↓ 1 callersMethodPost
()
pkg/rest/client.go:28
↓ 1 callersMethodPrefix
Prefix adds segments to the relative beginning to the request path. These items will be placed before the optional Namespace, Resource, or Name sectio
pkg/rest/request.go:152
↓ 1 callersMethodPut
()
pkg/rest/client.go:29
↓ 1 callersMethodRESTClient
RESTClient returns a RESTClient that is used to communicate with API server by this client implementation.
pkg/project/project.go:78
↓ 1 callersFunctionRESTClientFor
RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config object. Note that a RESTClient may require fields that a
pkg/rest/config.go:159
↓ 1 callersMethodRequestURI
RequestURI overwrites existing path and parameters with the value of the provided server relative URI.
pkg/rest/request.go:264
↓ 1 callersFunctionRoundToInt32
RoundToInt32 rounds floats into integer numbers.
pkg/rest/util/integer/integer.go:62
↓ 1 callersMethodSetBaseURL
SetBaseURL sets the base URL for API requests to a custom endpoint. urlStr should always be specified with a trailing slash.
harbor.go:50
↓ 1 callersMethodSleep
(d time.Duration)
pkg/rest/util/clock/clock.go:230
↓ 1 callersMethodStop
Stop stops the rate limiter, subsequent calls to CanAccept will return false
pkg/rest/util/flowcontrol/throttle.go:34
↓ 1 callersFunctionTransportFor
()
pkg/rest/transport.go:20
↓ 1 callersFunctioncheckWait
checkWait returns true along with a number of seconds if the server instructed us to wait before retrying.
pkg/rest/request.go:532
↓ 1 callersMethodinitEntryUnsafe
Take a lock on *Backoff, before calling initEntryUnsafe
pkg/rest/util/flowcontrol/backoff.go:139
↓ 1 callersFunctionnewArtifacts
newArtifacts returns a ConfigMaps
pkg/project/artifacts.go:38
↓ 1 callersFunctionnewClient
(harborClient *gorequest.SuperAgent, baseURL, username, password, version string)
harbor.go:60
↓ 1 callersFunctionnewRepositories
newRepositories returns a ConfigMaps
pkg/project/repository.go:38
↓ 1 callersMethodqueryMap
(content interface{})
pkg/rest/request.go:793
↓ 1 callersMethodqueryString
(content string)
pkg/rest/request.go:742
↓ 1 callersFunctionretryAfterSeconds
retryAfterSeconds returns the value of the Retry-After header and true, or 0 and false if the header was missing or not a valid number.
pkg/rest/request.go:545
↓ 1 callersMethodtransformResponse
transformResponse converts an API response into a structured API object
pkg/rest/request.go:608
↓ 1 callersMethodtransformUnstructuredResponseError
transformUnstructuredResponseError handles an error from the server that is not in a structured form. It is expected to transform any response that is
pkg/rest/request.go:592
next →1–100 of 250, ranked by callers