Revert "run remark linter locally"

This reverts commit 97c348f1ae.
This commit is contained in:
A.Unger
2020-09-23 11:48:59 +02:00
parent 97c348f1ae
commit 8b9e02ec0b
447 changed files with 6088 additions and 6178 deletions

View File

@@ -1,4 +1,4 @@
# Changelog for [0.3.0] \(2020-08-17)
# Changelog for [0.3.0] (2020-08-17)
The following sections list the changes in ocis-thumbnails 0.3.0.
@@ -6,25 +6,25 @@ The following sections list the changes in ocis-thumbnails 0.3.0.
## Summary
- Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#35](https://github.com/owncloud/ocis/thumbnails/pull/35)
- Enhancement - Serve the metrics endpoint: [#37](https://github.com/owncloud/ocis/thumbnails/issues/37)
* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#35](https://github.com/owncloud/ocis/thumbnails/pull/35)
* Enhancement - Serve the metrics endpoint: [#37](https://github.com/owncloud/ocis/thumbnails/issues/37)
## Details
- Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#35](https://github.com/owncloud/ocis/thumbnails/pull/35)
* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#35](https://github.com/owncloud/ocis/thumbnails/pull/35)
ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead.
ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead.
<https://github.com/owncloud/ocis/thumbnails/pull/35>
https://github.com/owncloud/ocis/thumbnails/pull/35
- Enhancement - Serve the metrics endpoint: [#37](https://github.com/owncloud/ocis/thumbnails/issues/37)
* Enhancement - Serve the metrics endpoint: [#37](https://github.com/owncloud/ocis/thumbnails/issues/37)
Added the metrics endpoint to be able to monitor this service like the other services
Added the metrics endpoint to be able to monitor this service like the other services
<https://github.com/owncloud/ocis/thumbnails/issues/37>
https://github.com/owncloud/ocis/thumbnails/issues/37
# Changelog for [0.2.0] \(2020-07-10)
# Changelog for [0.2.0] (2020-07-10)
The following sections list the changes in ocis-thumbnails 0.2.0.
@@ -32,43 +32,43 @@ The following sections list the changes in ocis-thumbnails 0.2.0.
## Summary
- Change - Add more default resolutions: [#23](https://github.com/owncloud/ocis/thumbnails/issues/23)
- Change - Refactor code to remove code smells: [#21](https://github.com/owncloud/ocis/thumbnails/issues/21)
- Change - Use micro service error api: [#31](https://github.com/owncloud/ocis/thumbnails/issues/31)
- Enhancement - Limit users to access own thumbnails: [#5](https://github.com/owncloud/ocis/thumbnails/issues/5)
* Change - Add more default resolutions: [#23](https://github.com/owncloud/ocis/thumbnails/issues/23)
* Change - Refactor code to remove code smells: [#21](https://github.com/owncloud/ocis/thumbnails/issues/21)
* Change - Use micro service error api: [#31](https://github.com/owncloud/ocis/thumbnails/issues/31)
* Enhancement - Limit users to access own thumbnails: [#5](https://github.com/owncloud/ocis/thumbnails/issues/5)
## Details
- Change - Add more default resolutions: [#23](https://github.com/owncloud/ocis/thumbnails/issues/23)
* Change - Add more default resolutions: [#23](https://github.com/owncloud/ocis/thumbnails/issues/23)
The `ocis-thumbnails` service was also used by the mediaviewer but the returned images were
too small since the highest resolution was 128x128 pixels.
The `ocis-thumbnails` service was also used by the mediaviewer but the returned images were
too small since the highest resolution was 128x128 pixels.
<https://github.com/owncloud/ocis/thumbnails/issues/23>
https://github.com/owncloud/ocis/thumbnails/issues/23
- Change - Refactor code to remove code smells: [#21](https://github.com/owncloud/ocis/thumbnails/issues/21)
* Change - Refactor code to remove code smells: [#21](https://github.com/owncloud/ocis/thumbnails/issues/21)
Scanning the code using a static code analyzer showed some code smells. This change fixes them.
Scanning the code using a static code analyzer showed some code smells. This change fixes them.
<https://github.com/owncloud/ocis/thumbnails/issues/21>
https://github.com/owncloud/ocis/thumbnails/issues/21
- Change - Use micro service error api: [#31](https://github.com/owncloud/ocis/thumbnails/issues/31)
* Change - Use micro service error api: [#31](https://github.com/owncloud/ocis/thumbnails/issues/31)
The service now also returns a status code when an error occurs.
The service now also returns a status code when an error occurs.
<https://github.com/owncloud/ocis/thumbnails/issues/31>
https://github.com/owncloud/ocis/thumbnails/issues/31
- Enhancement - Limit users to access own thumbnails: [#5](https://github.com/owncloud/ocis/thumbnails/issues/5)
* Enhancement - Limit users to access own thumbnails: [#5](https://github.com/owncloud/ocis/thumbnails/issues/5)
Users of the service can no longer request thumbnails of another users by guessing the etag. The
thumbnails are now only accessible by the users who created the thumbnail.
Users of the service can no longer request thumbnails of another users by guessing the etag. The
thumbnails are now only accessible by the users who created the thumbnail.
<https://github.com/owncloud/ocis/thumbnails/issues/5>
https://github.com/owncloud/ocis/thumbnails/issues/5
# Changelog for [0.1.2] \(2020-05-11)
# Changelog for [0.1.2] (2020-05-11)
The following sections list the changes in ocis-thumbnails 0.1.2.
@@ -76,19 +76,19 @@ The following sections list the changes in ocis-thumbnails 0.1.2.
## Summary
- Bugfix - Fix usage of context.Context: [#18](https://github.com/owncloud/ocis/thumbnails/issues/18)
* Bugfix - Fix usage of context.Context: [#18](https://github.com/owncloud/ocis/thumbnails/issues/18)
## Details
- Bugfix - Fix usage of context.Context: [#18](https://github.com/owncloud/ocis/thumbnails/issues/18)
* Bugfix - Fix usage of context.Context: [#18](https://github.com/owncloud/ocis/thumbnails/issues/18)
The context was filled with a key defined in the package service but read with a key from the
package imgsource. Since `service.key` and `imgsource.key` are different types imgsource
could not read the value provided by service.
The context was filled with a key defined in the package service but read with a key from the
package imgsource. Since `service.key` and `imgsource.key` are different types imgsource
could not read the value provided by service.
<https://github.com/owncloud/ocis/thumbnails/issues/18>
https://github.com/owncloud/ocis/thumbnails/issues/18
# Changelog for [0.1.1] \(2020-04-21)
# Changelog for [0.1.1] (2020-04-21)
The following sections list the changes in ocis-thumbnails 0.1.1.
@@ -96,18 +96,18 @@ The following sections list the changes in ocis-thumbnails 0.1.1.
## Summary
- Bugfix - Fix execution when passing program flags: [#15](https://github.com/owncloud/ocis/thumbnails/issues/15)
* Bugfix - Fix execution when passing program flags: [#15](https://github.com/owncloud/ocis/thumbnails/issues/15)
## Details
- Bugfix - Fix execution when passing program flags: [#15](https://github.com/owncloud/ocis/thumbnails/issues/15)
* Bugfix - Fix execution when passing program flags: [#15](https://github.com/owncloud/ocis/thumbnails/issues/15)
The program flags where not correctly recognized because we didn't pass them to the micro
framework when initializing a grpc service.
The program flags where not correctly recognized because we didn't pass them to the micro
framework when initializing a grpc service.
<https://github.com/owncloud/ocis/thumbnails/issues/15>
https://github.com/owncloud/ocis/thumbnails/issues/15
# Changelog for [0.1.0] \(2020-03-31)
# Changelog for [0.1.0] (2020-03-31)
The following sections list the changes in ocis-thumbnails 0.1.0.
@@ -115,32 +115,33 @@ The following sections list the changes in ocis-thumbnails 0.1.0.
## Summary
- Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis/thumbnails/issues/1)
- Change - Use predefined resolutions for thumbnail generation: [#7](https://github.com/owncloud/ocis/thumbnails/issues/7)
- Change - Implement the first working version: [#3](https://github.com/owncloud/ocis/thumbnails/pull/3)
* Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis/thumbnails/issues/1)
* Change - Use predefined resolutions for thumbnail generation: [#7](https://github.com/owncloud/ocis/thumbnails/issues/7)
* Change - Implement the first working version: [#3](https://github.com/owncloud/ocis/thumbnails/pull/3)
## Details
- Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis/thumbnails/issues/1)
* Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis/thumbnails/issues/1)
Just prepare an initial basic version to embed a thumbnailer into our microservice
infrastructure in the scope of the ownCloud Infinite Scale project.
Just prepare an initial basic version to embed a thumbnailer into our microservice
infrastructure in the scope of the ownCloud Infinite Scale project.
<https://github.com/owncloud/ocis/thumbnails/issues/1>
https://github.com/owncloud/ocis/thumbnails/issues/1
- Change - Use predefined resolutions for thumbnail generation: [#7](https://github.com/owncloud/ocis/thumbnails/issues/7)
* Change - Use predefined resolutions for thumbnail generation: [#7](https://github.com/owncloud/ocis/thumbnails/issues/7)
We implemented predefined resolutions to prevent attacker from flooding the service with a
large number of thumbnails. The requested resolution gets mapped to the closest matching
predefined resolution.
We implemented predefined resolutions to prevent attacker from flooding the service with a
large number of thumbnails. The requested resolution gets mapped to the closest matching
predefined resolution.
<https://github.com/owncloud/ocis/thumbnails/issues/7>
https://github.com/owncloud/ocis/thumbnails/issues/7
- Change - Implement the first working version: [#3](https://github.com/owncloud/ocis/thumbnails/pull/3)
* Change - Implement the first working version: [#3](https://github.com/owncloud/ocis/thumbnails/pull/3)
We implemented the first simple version. It can load images via webdav and store them locally in
the filesystem.
We implemented the first simple version. It can load images via webdav and store them locally in
the filesystem.
https://github.com/owncloud/ocis/thumbnails/pull/3
<https://github.com/owncloud/ocis/thumbnails/pull/3>

View File

@@ -2,7 +2,7 @@
[![Build Status](https://cloud.drone.io/api/badges/owncloud/ocis-thumbnails/status.svg)](https://cloud.drone.io/owncloud/ocis-thumbnails)
[![Gitter chat](https://badges.gitter.im/cs3org/reva.svg)](https://gitter.im/cs3org/reva)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5dcc0c9b2319462dbbe517d90219062c)](https://www.codacy.com/gh/owncloud/ocis-thumbnails?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis-thumbnails&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5dcc0c9b2319462dbbe517d90219062c)](https://www.codacy.com/gh/owncloud/ocis-thumbnails?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=owncloud/ocis-thumbnails&amp;utm_campaign=Badge_Grade)
[![Go Doc](https://godoc.org/github.com/owncloud/ocis-thumbnails?status.svg)](http://godoc.org/github.com/owncloud/ocis-thumbnails)
[![Go Report](http://goreportcard.com/badge/github.com/owncloud/ocis-thumbnails)](http://goreportcard.com/report/github.com/owncloud/ocis-thumbnails)
[![](https://images.microbadger.com/badges/image/owncloud/ocis-thumbnails.svg)](http://microbadger.com/images/owncloud/ocis-thumbnails "Get your own image badge on microbadger.com")
@@ -29,7 +29,7 @@ make generate build
## Security
If you find a security issue please contact [security@owncloud.com](mailto:security@owncloud.com) first.
If you find a security issue please contact security@owncloud.com first.
## Contributing

View File

@@ -4,4 +4,4 @@ Just prepare an initial basic version to embed a thumbnailer into our
microservice infrastructure in the scope of the ownCloud Infinite Scale
project.
<https://github.com/owncloud/ocis/thumbnails/issues/1>
https://github.com/owncloud/ocis/thumbnails/issues/1

View File

@@ -3,4 +3,4 @@ Change: Use predefined resolutions for thumbnail generation
We implemented predefined resolutions to prevent attacker from flooding the service with a large number of thumbnails.
The requested resolution gets mapped to the closest matching predefined resolution.
<https://github.com/owncloud/ocis/thumbnails/issues/7>
https://github.com/owncloud/ocis/thumbnails/issues/7

View File

@@ -3,4 +3,4 @@ Change: implement the first working version
We implemented the first simple version.
It can load images via webdav and store them locally in the filesystem.
<https://github.com/owncloud/ocis/thumbnails/pull/3>
https://github.com/owncloud/ocis/thumbnails/pull/3

View File

@@ -3,4 +3,4 @@ Bugfix: Fix execution when passing program flags
The program flags where not correctly recognized because we didn't pass them to
the micro framework when initializing a grpc service.
<https://github.com/owncloud/ocis/thumbnails/issues/15>
https://github.com/owncloud/ocis/thumbnails/issues/15

View File

@@ -3,4 +3,4 @@ Bugfix: Fix usage of context.Context
The context was filled with a key defined in the package service but read with a key from the package imgsource.
Since `service.key` and `imgsource.key` are different types imgsource could not read the value provided by service.
<https://github.com/owncloud/ocis/thumbnails/issues/18>
https://github.com/owncloud/ocis/thumbnails/issues/18

View File

@@ -3,4 +3,4 @@ Change: add more default resolutions
The `ocis-thumbnails` service was also used by the mediaviewer but the returned
images were too small since the highest resolution was 128x128 pixels.
<https://github.com/owncloud/ocis/thumbnails/issues/23>
https://github.com/owncloud/ocis/thumbnails/issues/23

View File

@@ -3,4 +3,4 @@ Change: refactor code to remove code smells
Scanning the code using a static code analyzer showed some code smells.
This change fixes them.
<https://github.com/owncloud/ocis/thumbnails/issues/21>
https://github.com/owncloud/ocis/thumbnails/issues/21

View File

@@ -3,4 +3,4 @@ Enhancement: Limit users to access own thumbnails
Users of the service can no longer request thumbnails of another users by guessing the etag.
The thumbnails are now only accessible by the users who created the thumbnail.
<https://github.com/owncloud/ocis/thumbnails/issues/5>
https://github.com/owncloud/ocis/thumbnails/issues/5

View File

@@ -2,4 +2,4 @@ Change: use micro service error api
The service now also returns a status code when an error occurs.
<https://github.com/owncloud/ocis/thumbnails/issues/31>
https://github.com/owncloud/ocis/thumbnails/issues/31

View File

@@ -2,4 +2,4 @@ Enhancement: serve the metrics endpoint
Added the metrics endpoint to be able to monitor this service like the other services
<https://github.com/owncloud/ocis/thumbnails/issues/37>
https://github.com/owncloud/ocis/thumbnails/issues/37

View File

@@ -2,4 +2,4 @@ Bugfix: build docker images with alpine:latest instead of alpine:edge
ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead.
<https://github.com/owncloud/ocis/thumbnails/pull/35>
https://github.com/owncloud/ocis/thumbnails/pull/35

View File

@@ -1,11 +1,10 @@
* * *
---
title: "Thumbnails"
date: 2018-05-02T00:00:00+00:00
weight: 10
geekdocRepo: <https://github.com/owncloud/ocis-thumbnails>
geekdocRepo: https://github.com/owncloud/ocis-thumbnails
geekdocEditPath: edit/master/docs
## geekdocFilePath: \_index.md
geekdocFilePath: _index.md
---
This service provides an ocis extensions which generates thumbnails for image files.

View File

@@ -1,29 +1,28 @@
* * *
---
title: "Building"
date: 2018-05-02T00:00:00+00:00
weight: 30
geekdocRepo: <https://github.com/owncloud/ocis-thumbnails>
geekdocRepo: https://github.com/owncloud/ocis-thumbnails
geekdocEditPath: edit/master/docs
geekdocFilePath: building.md
---
## geekdocFilePath: building.md
{{&lt; toc >}}
{{< toc >}}
As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install), to build this project you have to install Go >= v1.12. After the installation of the required tools you need to get the sources:
{{&lt; highlight txt >}}
git clone <https://github.com/owncloud/ocis-thubnails.git>
{{< highlight txt >}}
git clone https://github.com/owncloud/ocis-thubnails.git
cd {{ Name }}
{{&lt; / highlight >}}
{{< / highlight >}}
All required tool besides Go itself and make are bundled or getting automatically installed within the `Gopath`. All commands to build this project are part of our `Makefile`.
## Backend
{{&lt; highlight txt >}}
{{< highlight txt >}}
make generate
make build
{{&lt; / highlight >}}
{{< / highlight >}}
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-thumbnails -h` to see all available options.

View File

@@ -1,14 +1,13 @@
* * *
---
title: "Getting Started"
date: 2018-05-02T00:00:00+00:00
weight: 20
geekdocRepo: <https://github.com/owncloud/ocis-thumbnails>
geekdocRepo: https://github.com/owncloud/ocis-thumbnails
geekdocEditPath: edit/master/docs
geekdocFilePath: getting-started.md
---
## geekdocFilePath: getting-started.md
{{&lt; toc >}}
{{< toc >}}
## Installation
@@ -89,7 +88,7 @@ THUMBNAILS_WEBDAVSOURCE_BASEURL
: Base url for a webdav api, defaults to `https://localhost:9200/remote.php/webdav/`
THUMBNAILS_RESOLUTIONS
: List of resolutions supported by the service, defaults to \`["16x16", "32x32", "64x64", "128x128"]
: List of resolutions supported by the service, defaults to `["16x16", "32x32", "64x64", "128x128"]
#### Health
@@ -102,68 +101,68 @@ If you prefer to configure the service with commandline flags you can see the av
#### Global
\--config-file
--config-file
: Path to config file, empty default value
\--log-level
--log-level
: Set logging level, defaults to `info`
\--log-color
--log-color
: Enable colored logging, defaults to `true`
\--log-pretty
--log-pretty
: Enable pretty logging, defaults to `true`
#### Server
\--tracing-enabled
--tracing-enabled
: Enable sending traces, defaults to `false`
\--tracing-type
--tracing-type
: Tracing backend type, defaults to `jaeger`
\--tracing-endpoint
--tracing-endpoint
: Endpoint for the agent, empty default value
\--tracing-collector
--tracing-collector
: Endpoint for the collector, empty default value
\--tracing-service
--tracing-service
: Service name for tracing, defaults to `thumbnails`
\--debug-addr
--debug-addr
: Address to bind debug server, defaults to `0.0.0.0:9189`
\--debug-token
--debug-token
: Token to grant metrics access, empty default value
\--debug-pprof
--debug-pprof
: Enable pprof debugging, defaults to `false`
\--debug-zpages
--debug-zpages
: Enable zpages debugging, defaults to `false`
\--grpc-name
--grpc-name
: Name of the service, defaults to `thumbnails`
\--grpc-addr
--grpc-addr
: Address to bind grpc server, defaults to `0.0.0.0:9185`
\--grpc-namespace
--grpc-namespace
: Set the base namespace for the grpc namespace", defaults to `com.owncloud.api`
\--filesystemstorage-root
--filesystemstorage-root
: Root path of the filesystem storage directory, defaults to `<os tempdir>/ocis-thumbnails/`
\--webdavsource-baseurl
--webdavsource-baseurl
: Base url for a webdav api, defaults to `https://localhost:9200/remote.php/webdav/`
\--thumbnail-resolution
: List of resolutions supported by the service, defaults to \`["16x16", "32x32", "64x64", "128x128"]
--thumbnail-resolution
: List of resolutions supported by the service, defaults to `["16x16", "32x32", "64x64", "128x128"]
#### Health
\--debug-addr
--debug-addr
: Address to debug endpoint, defaults to `0.0.0.0:9189`
### Configuration file
@@ -178,17 +177,17 @@ The program provides a few sub-commands on execution. The available configuratio
The server command is used to start the http and debug server on two addresses within a single process. The http server is serving the general webservice while the debug server is used for health check, readiness check and to server the metrics mentioned below. For further help please execute:
{{&lt; highlight txt >}}
{{< highlight txt >}}
{{ Name }} server --help
{{&lt; / highlight >}}
{{< / highlight >}}
### Health
The health command is used to execute a health check, if the exit code equals zero the service should be up and running, if the exist code is greater than zero the service is not in a healthy state. Generally this command is used within our Docker containers, it could also be used within Kubernetes.
{{&lt; highlight txt >}}
{{< highlight txt >}}
{{ Name }} health --help
{{&lt; / highlight >}}
{{< / highlight >}}
## Metrics

View File

@@ -1,14 +1,13 @@
* * *
---
title: "GRPC API"
date: 2018-05-02T00:00:00+00:00
weight: 50
geekdocRepo: <https://github.com/owncloud/ocis-thumbnails>
geekdocRepo: https://github.com/owncloud/ocis-thumbnails
geekdocEditPath: edit/master/docs
geekdocFilePath: grpc.md
---
## geekdocFilePath: grpc.md
{{&lt; toc >}}
{{< toc >}}
## pkg/proto/v0/thumbnails.proto
@@ -16,57 +15,57 @@ geekdocEditPath: edit/master/docs
A request to retrieve a thumbnail
| Field | Type | Label | Description |
| ------------- | ------------------------------------------ | ----- | ------------------------------------------------------ |
| filepath | [string](#string) | | The path to the source image |
| filetype | [GetRequest.FileType](#getrequestfiletype) | | The type to which the thumbnail should get encoded to. |
| etag | [string](#string) | | The etag of the source image |
| width | [int32](#int32) | | The width of the thumbnail |
| height | [int32](#int32) | | The height of the thumbnail |
| authorization | [string](#string) | | The authorization token |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| filepath | [string](#string) | | The path to the source image |
| filetype | [GetRequest.FileType](#getrequestfiletype) | | The type to which the thumbnail should get encoded to. |
| etag | [string](#string) | | The etag of the source image |
| width | [int32](#int32) | | The width of the thumbnail |
| height | [int32](#int32) | | The height of the thumbnail |
| authorization | [string](#string) | | The authorization token |
### GetResponse
The service response
| Field | Type | Label | Description |
| --------- | ----------------- | ----- | ----------------------------- |
| thumbnail | [bytes](#bytes) | | The thumbnail as a binary |
| mimetype | [string](#string) | | The mimetype of the thumbnail |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| thumbnail | [bytes](#bytes) | | The thumbnail as a binary |
| mimetype | [string](#string) | | The mimetype of the thumbnail |
### GetRequest.FileType
The file types to which the thumbnail cna get encoded to.
| Name | Number | Description |
| ---- | ------ | ------------------- |
| PNG | 0 | Represents PNG type |
| JPG | 1 | Represents JPG type |
| Name | Number | Description |
| ---- | ------ | ----------- |
| PNG | 0 | Represents PNG type |
| JPG | 1 | Represents JPG type |
### ThumbnailService
A Service for handling thumbnail generation
| Method Name | Request Type | Response Type | Description |
| ------------ | ------------------------- | --------------------------- | --------------------------------------- |
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| GetThumbnail | [GetRequest](#getrequest) | [GetResponse](#getresponse) | Generates the thumbnail and returns it. |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- |
| {{&lt; div id="double" content="double" >}} | | double | double |
| {{&lt; div id="float" content="float" >}} | | float | float |
| {{&lt; div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{&lt; div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{&lt; div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{&lt; div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{&lt; div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{&lt; div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{&lt; div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{&lt; div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{&lt; div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{&lt; div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{&lt; div id="bool" content="bool" >}} | | bool | boolean |
| {{&lt; div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{&lt; div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |

View File

@@ -1,11 +1,10 @@
* * *
---
title: "License"
date: 2018-05-02T00:00:00+00:00
weight: 60
geekdocRepo: <https://github.com/owncloud/ocis-thumbnails>
geekdocRepo: https://github.com/owncloud/ocis-thumbnails
geekdocEditPath: edit/master/docs
## geekdocFilePath: license.md
geekdocFilePath: license.md
---
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/thumbnails/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.

View File

@@ -1,46 +1,45 @@
* * *
---
title: "Releasing"
date: 2018-05-02T00:00:00+00:00
weight: 40
geekdocRepo: <https://github.com/owncloud/ocis-thumbnails>
geekdocRepo: https://github.com/owncloud/ocis-thumbnails
geekdocEditPath: edit/master/docs
geekdocFilePath: releasing.md
---
## geekdocFilePath: releasing.md
{{&lt; toc >}}
{{< toc >}}
To release a new version of ocis-thumbnails, you have to follow a few simple steps.
## Preperation
1. Create a new branch e.g. `release-x.x.x` where `x.x.x` is the version you want to release.
2. Checkout the preparation branch.
3. Create a new changelog folder and move the unreleased snippets there.
{{&lt; highlight txt >}}
mkdir changelog/x.x.x_yyyy-MM-dd/ # yyyy-MM-dd is the current date
mv changelog/unreleased/\* changelog/x.x.x_yyyy-MM-dd/
{{&lt; / highlight >}}
4. Commit and push the changes
{{&lt; highlight txt >}}
git add --all
git commit -m "prepare release x.x.x"
git push
{{&lt; / highlight >}}
5. Create a pull request to the master branch.
1. Create a new branch e.g. `release-x.x.x` where `x.x.x` is the version you want to release.
2. Checkout the preparation branch.
3. Create a new changelog folder and move the unreleased snippets there.
{{< highlight txt >}}
mkdir changelog/x.x.x_yyyy-MM-dd/ # yyyy-MM-dd is the current date
mv changelog/unreleased/* changelog/x.x.x_yyyy-MM-dd/
{{< / highlight >}}
4. Commit and push the changes
{{< highlight txt >}}
git add --all
git commit -m "prepare release x.x.x"
git push
{{< / highlight >}}
5. Create a pull request to the master branch.
## Release
1. After the preparation branch has been merged update your local master.
{{< highlight txt >}}
git checkout master
git pull
{{< / highlight >}}
2. Create a new tag (preferably signed).
{{< highlight txt >}}
git tag -s vx.x.x -m "release vx.x.x"
git push --tags
{{< / highlight >}}
3. Wait for CI and check that the GitHub release was published.
1. After the preparation branch has been merged update your local master.
{{&lt; highlight txt >}}
git checkout master
git pull
{{&lt; / highlight >}}
2. Create a new tag (preferably signed).
{{&lt; highlight txt >}}
git tag -s vx.x.x -m "release vx.x.x"
git push --tags
{{&lt; / highlight >}}
3. Wait for CI and check that the GitHub release was published.
Congratulations, you just released ocis-thumbnails!