MCPcopy
hub / github.com/minio/minio-go / validate

Method validate

api-append-object.go:90–104  ·  view source on GitHub ↗
(c *Client)

Source from the content-addressed store, hash-verified

88}
89
90func (opts AppendObjectOptions) validate(c *Client) (err error) {
91 if opts.ChunkSize > maxPartSize {
92 return errInvalidArgument("Append chunkSize cannot be larger than max part size allowed")
93 }
94 switch {
95 case !c.trailingHeaderSupport:
96 return errInvalidArgument("AppendObject() requires Client with TrailingHeaders enabled")
97 case c.overrideSignerType.IsV2():
98 return errInvalidArgument("AppendObject() cannot be used with v2 signatures")
99 case s3utils.IsGoogleEndpoint(*c.endpointURL):
100 return errInvalidArgument("AppendObject() cannot be used with GCS endpoints")
101 }
102
103 return nil
104}
105
106// appendObjectDo - executes the append object http operation.
107// NOTE: You must have WRITE permissions on a bucket to add an object to it.

Callers 1

AppendObjectMethod · 0.45

Calls 3

IsGoogleEndpointFunction · 0.92
errInvalidArgumentFunction · 0.85
IsV2Method · 0.80

Tested by

no test coverage detected