Skip to content

Commit b87fc22

Browse files
authored
Merge pull request #11 from imagekit-developer/release-please--branches--master--changes--next
release: 2.0.0
2 parents 1d7e6e6 + b50d67b commit b87fc22

File tree

174 files changed

+32521
-6532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+32521
-6532
lines changed

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
3+
{
4+
"name": "Development",
5+
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
6+
"postCreateCommand": "go mod tidy"
7+
}

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
14+
15+
jobs:
16+
lint:
17+
timeout-minutes: 10
18+
name: lint
19+
runs-on: ${{ github.repository == 'stainless-sdks/imagekit-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Setup go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version-file: ./go.mod
29+
30+
- name: Run lints
31+
run: ./scripts/lint
32+
test:
33+
timeout-minutes: 10
34+
name: test
35+
runs-on: ${{ github.repository == 'stainless-sdks/imagekit-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
36+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Setup go
41+
uses: actions/setup-go@v5
42+
with:
43+
go-version-file: ./go.mod
44+
45+
- name: Bootstrap
46+
run: ./scripts/bootstrap
47+
48+
- name: Run tests
49+
run: ./scripts/test

.github/workflows/test-coverage.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitignore

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
# Binaries for programs and plugins
2-
*.exe
3-
*.exe~
4-
*.dll
5-
*.so
6-
*.dylib
7-
8-
# Test binary, built with `go test -c`
9-
*.test
10-
11-
# Output of the go coverage tool, specifically when used with LiteIDE
12-
*.out
13-
14-
# Dependency directories (remove the comment below to include it)
15-
# vendor/
1+
.prism.log
2+
codegen.log
3+
Brewfile.lock.json
4+
.idea/
5+
temp*
6+
node-sdk-diff*
7+
.env*

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "2.0.0"
3+
}

.stats.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
configured_endpoints: 43
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-c7ad6f552b38f2145781847f8b390fa1ec43068d64e45a33012a97a9299edc10.yml
3+
openapi_spec_hash: 50f281e91210ad5018ac7e4eee216f56
4+
config_hash: 74a8263b80c732a2b016177e7d56bb9c

Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
brew "go"

CHANGELOG.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Changelog
2+
3+
## 2.0.0 (2025-10-05)
4+
5+
Full Changelog: [v0.0.1...v2.0.0](https://github.com/imagekit-developer/imagekit-go/compare/v0.0.1...v2.0.0)
6+
7+
### Features
8+
9+
* **api:** add BaseWebhookEvent ([49aee77](https://github.com/imagekit-developer/imagekit-go/commit/49aee77cc145d6f45eb44dd5e6fc080c7fe7a001))
10+
* **api:** add dummy endpoint for shared model generation in go ([c5b8b5f](https://github.com/imagekit-developer/imagekit-go/commit/c5b8b5f8abce0058c19693590dc00b575da039d3))
11+
* **api:** add path policy related non-breaking changes ([385c57b](https://github.com/imagekit-developer/imagekit-go/commit/385c57b53db52f1ac00ad75f99f9015541aaf45c))
12+
* **api:** add selectedFieldsSchema in upload and list API response ([7e3af2b](https://github.com/imagekit-developer/imagekit-go/commit/7e3af2b3672a75cac175489564579df8ed6fc98a))
13+
* **api:** extract UpdateFileDetailsRequest to model ([8b5aea9](https://github.com/imagekit-developer/imagekit-go/commit/8b5aea9dde90cbe13cba1d451fb01ad35dfd2e13))
14+
* **api:** fix upload API request params ([db0d74c](https://github.com/imagekit-developer/imagekit-go/commit/db0d74c7e7be7f041110b967ad2aac6d0b90684e))
15+
* **api:** manual updates ([acff3e5](https://github.com/imagekit-developer/imagekit-go/commit/acff3e528b86aa7423ae204e2910556f0246e554))
16+
* **api:** manual updates ([98f9de6](https://github.com/imagekit-developer/imagekit-go/commit/98f9de6e111944c0d81a129ad511e79d34c974a5))
17+
* **api:** manual updates ([49c8193](https://github.com/imagekit-developer/imagekit-go/commit/49c8193c3192fb49491cbc5ae5e2b4acb212c21e))
18+
* **api:** manual updates ([a6a9d9c](https://github.com/imagekit-developer/imagekit-go/commit/a6a9d9cc5d0f3d40aa536aa14ea3a3c3b181a6d8))
19+
* **api:** manual updates ([67b5049](https://github.com/imagekit-developer/imagekit-go/commit/67b5049b88e5feb8815ab087d3efffc9173596fc))
20+
* **api:** manual updates ([5829397](https://github.com/imagekit-developer/imagekit-go/commit/58293972018671d07621207fabde810e368be16e))
21+
* **api:** manual updates ([cc22fef](https://github.com/imagekit-developer/imagekit-go/commit/cc22fef638f68ff664019f5ba24f4292c7866771))
22+
* **api:** manual updates ([051d622](https://github.com/imagekit-developer/imagekit-go/commit/051d6221e188479c80197daaf448ce70c7d1248a))
23+
* **api:** manual updates ([452fcb4](https://github.com/imagekit-developer/imagekit-go/commit/452fcb4070c0141322f5b49180986a10ee07be22))
24+
* **api:** manual updates ([66bd0b0](https://github.com/imagekit-developer/imagekit-go/commit/66bd0b077f7ef37b59294dd0761648f35c028747))
25+
* **api:** manual updates ([9a4ab31](https://github.com/imagekit-developer/imagekit-go/commit/9a4ab3117285fd91a09f4b0ef3b868ca5d46ae63))
26+
* **api:** manual updates ([67adab7](https://github.com/imagekit-developer/imagekit-go/commit/67adab7a0d64f06f0fc9beed70c67cad3b5f1706))
27+
* **api:** manual updates ([5237fb5](https://github.com/imagekit-developer/imagekit-go/commit/5237fb51c965361f7d96d3dada6726d54cb7349c))
28+
* **api:** manual updates ([b7169f4](https://github.com/imagekit-developer/imagekit-go/commit/b7169f426e0c8bcb6cebbd9413a5674cdaf79b5b))
29+
* **api:** manual updates ([bc53c1a](https://github.com/imagekit-developer/imagekit-go/commit/bc53c1a5493d2fbe02f90523d3578e3cd19b8260))
30+
* **api:** manual updates ([e197563](https://github.com/imagekit-developer/imagekit-go/commit/e1975634e1a07e8276fe79314f91b84d06a4399d))
31+
* **api:** modify multipart marshaling for file upload parameters as per our backend expects ([aba9cfa](https://github.com/imagekit-developer/imagekit-go/commit/aba9cfaec6a5f0c97c60da752f821433cbd718c4))
32+
* **api:** remove Stainless attribution from readme ([e41a4bd](https://github.com/imagekit-developer/imagekit-go/commit/e41a4bd5601df12655cff51873049c0280e439ed))
33+
* **api:** update api docs link ([9c185d4](https://github.com/imagekit-developer/imagekit-go/commit/9c185d44f474acc5d5da001d0da62378bfd276fc))
34+
* **api:** Update env var name ([d7aace7](https://github.com/imagekit-developer/imagekit-go/commit/d7aace7fc7604c66ad73d701595b440ae1578c75))
35+
* **api:** updated docs ([2f0ac45](https://github.com/imagekit-developer/imagekit-go/commit/2f0ac45bea1908568a08cd1b44f76eb46e6a4dbc))
36+
* **examples:** add file upload examples for local, base64, URL, and advanced uploads ([799c172](https://github.com/imagekit-developer/imagekit-go/commit/799c172fb612ea829609e2471f7ec61439a354b3))
37+
38+
39+
### Bug Fixes
40+
41+
* bugfix for setting JSON keys with special characters ([07ab70c](https://github.com/imagekit-developer/imagekit-go/commit/07ab70ce76d2472aaf15c021719e2fed71b5cd32))
42+
* **internal:** unmarshal correctly when there are multiple discriminators ([b87188b](https://github.com/imagekit-developer/imagekit-go/commit/b87188b901ba7422570ed594ee0185fc6e4545b3))
43+
* **README:** update example webhook secrets and improve event logging for clarity ([cbf2a51](https://github.com/imagekit-developer/imagekit-go/commit/cbf2a51cc744d3222c4d029ffcbfbe6c41d9c845))
44+
* **tests:** update gradient transformation test case with new parameters ([02ab219](https://github.com/imagekit-developer/imagekit-go/commit/02ab21975a27393904724f120d6f837a2dc094c0))
45+
* update import paths to use the correct imagekit-developer repository ([09f4ca0](https://github.com/imagekit-developer/imagekit-go/commit/09f4ca00e565bd2ac6f47ac52fcc66aa14610dd9))
46+
* use slices.Concat instead of sometimes modifying r.Options ([7822f5a](https://github.com/imagekit-developer/imagekit-go/commit/7822f5a23a73feacec29a3db1011bc01c3318e10))
47+
* **webhook:** encode webhook secret in base64 before verification ([6f18756](https://github.com/imagekit-developer/imagekit-go/commit/6f187566f76695ae21e56b8f52ddc963be519058))
48+
49+
50+
### Chores
51+
52+
* bump minimum go version to 1.22 ([2cd7a9b](https://github.com/imagekit-developer/imagekit-go/commit/2cd7a9bd62b9cc830bf59d3cce7b11f2b05528e2))
53+
* do not install brew dependencies in ./scripts/bootstrap by default ([ac2daaa](https://github.com/imagekit-developer/imagekit-go/commit/ac2daaa1b8bfa78b1bc814e98a5c220c402f973d))
54+
* **internal:** codegen related update ([a9dae33](https://github.com/imagekit-developer/imagekit-go/commit/a9dae337065c0b204dcf4a3a65da0d9abbe1b376))
55+
* sync repo ([9c87c18](https://github.com/imagekit-developer/imagekit-go/commit/9c87c185f17e8c881e666149f590559512df501f))
56+
* update more docs for 1.22 ([6cfe89f](https://github.com/imagekit-developer/imagekit-go/commit/6cfe89f7c0d5968ca9d4bc10e54f5debf83f2c1b))
57+
* update SDK settings ([369f85d](https://github.com/imagekit-developer/imagekit-go/commit/369f85da041fd5a4b6b379c994e3ac1d9ebed36f))
58+
* update SDK settings ([2d43aee](https://github.com/imagekit-developer/imagekit-go/commit/2d43aee37d06353a55a9894a52ed5b4b8300d91b))
59+
60+
61+
### Documentation
62+
63+
* correct typo in default value description for custom metadata field ([64ff337](https://github.com/imagekit-developer/imagekit-go/commit/64ff3372bf902c9b7db2e2273abd15fa0010d1ab))
64+
* **README:** add section on using Raw transformations for undocumented features ([09d84f7](https://github.com/imagekit-developer/imagekit-go/commit/09d84f71136a819c3638e4e894f0f009890c5ca0))
65+
* **README:** update file upload examples to use local files and improve error handling ([c20f7b7](https://github.com/imagekit-developer/imagekit-go/commit/c20f7b731608bb3e0b60d508da1a365cca11861b))
66+
* **README:** update SDK description and enhance table of contents with detailed sections ([acc22b8](https://github.com/imagekit-developer/imagekit-go/commit/acc22b80ba4c10a13bb576417c8099b931349fbc))
67+
68+
69+
### Refactors
70+
71+
* **helper:** remove legacy Helper struct and streamline methods in HelperService ([534383e](https://github.com/imagekit-developer/imagekit-go/commit/534383e3c9f70514ff66fc8f2932293b2ba49a9d))
72+
* **helper:** replace UUID token generation with random byte generation and update tests for hex format ([4e30f5a](https://github.com/imagekit-developer/imagekit-go/commit/4e30f5a42441dc3436c2058a9db68d10de0f08bb))
73+
* **helper:** streamline transformation string generation with mapping functions ([36ccee1](https://github.com/imagekit-developer/imagekit-go/commit/36ccee1628edcb86929c8446c03060a310d840d6))
74+
* **helper:** update HelperService to return errors instead of panicking and adjust related tests ([0f5bb17](https://github.com/imagekit-developer/imagekit-go/commit/0f5bb17456294880973720f38a5cc717fdc45f95))
75+
* **tests:** improve test case descriptions in helper_overlay_test.go ([eb8c7d9](https://github.com/imagekit-developer/imagekit-go/commit/eb8c7d998be411141493fe9f79ba91df36e1f673))
76+
* **tests:** reorder import statements and enhance test descriptions in helper tests ([eff5fb6](https://github.com/imagekit-developer/imagekit-go/commit/eff5fb60832e50dde37b982e4ff5c12b74e40dad))
77+
* **upload:** update file upload parameter documentation to clarify required io.Reader type ([c5aabc6](https://github.com/imagekit-developer/imagekit-go/commit/c5aabc6de66ab4e43a37e939bdc279421ed0a4fb))

CONTRIBUTING.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
## Setting up the environment
2+
3+
To set up the repository, run:
4+
5+
```sh
6+
$ ./scripts/bootstrap
7+
$ ./scripts/lint
8+
```
9+
10+
This will install all the required dependencies and build the SDK.
11+
12+
You can also [install go 1.22+ manually](https://go.dev/doc/install).
13+
14+
## Modifying/Adding code
15+
16+
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
17+
result in merge conflicts between manual patches and changes from the generator. The generator will never
18+
modify the contents of the `lib/` and `examples/` directories.
19+
20+
## Adding and running examples
21+
22+
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
23+
24+
```go
25+
# add an example to examples/<your-example>/main.go
26+
27+
package main
28+
29+
func main() {
30+
// ...
31+
}
32+
```
33+
34+
```sh
35+
$ go run ./examples/<your-example>
36+
```
37+
38+
## Using the repository from source
39+
40+
To use a local version of this library from source in another project, edit the `go.mod` with a replace
41+
directive. This can be done through the CLI with the following:
42+
43+
```sh
44+
$ go mod edit -replace github.com/imagekit-developer/imagekit-go=/path/to/imagekit-go
45+
```
46+
47+
## Running tests
48+
49+
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
50+
51+
```sh
52+
# you will need npm installed
53+
$ npx prism mock path/to/your/openapi.yml
54+
```
55+
56+
```sh
57+
$ ./scripts/test
58+
```
59+
60+
## Formatting
61+
62+
This library uses the standard gofmt code formatter:
63+
64+
```sh
65+
$ ./scripts/format
66+
```

0 commit comments

Comments
 (0)