Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial docs #1455

Draft
wants to merge 11 commits into
base: staging
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif
include _util/build_$(PLATFORM).mk
include _util/build_mobile.mk

.PHONY: build-tools install-all herumi-all gosdk-all sdkver help lint
.PHONY: build-tools install-all herumi-all gosdk-all sdkver help lint docs

default: help

Expand Down Expand Up @@ -108,3 +108,5 @@ install-herumi-ubuntu:
rm -R /tmp/mcl && \
rm -R /tmp/bls

docs:
@gomarkdoc --exclude-dirs ./zcncore/sample --output '{{.Dir}}/README.md' --repository.default-branch doc/initial ./...
103 changes: 103 additions & 0 deletions constants/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!-- Code generated by gomarkdoc. DO NOT EDIT -->

# constants

```go
import "github.com/0chain/gosdk/constants"
```

Package constants provides constants.the convention of naming is to use MixedCaps or mixedCaps rather than underscores to write multiword names. https://golang.org/doc/effective_go#mixed-caps

## Index

- [Constants](<#constants>)
- [Variables](<#variables>)
- [type ContextKey](<#ContextKey>)


## Constants

<a name="FileOperationInsert"></a>

```go
const (
// FileOperationInsert method name of add new file
FileOperationInsert = "insert"
FileOperationDelete = "delete"
FileOperationUpdate = "update"
FileOperationRename = "rename"
FileOperationCopy = "copy"
FileOperationMove = "move"
FileOperationCreateDir = "createdir"
)
```

## Variables

<a name="ErrInvalidParameter"></a>

```go
var (
// ErrInvalidParameter parameter is not specified or invalid
ErrInvalidParameter = errors.New("invalid parameter")

// ErrUnableHash failed to hash with unknown exception
ErrUnableHash = errors.New("unable to hash")

// ErrUnableWriteFile failed to write bytes to file
ErrUnableWriteFile = errors.New("unable to write file")

// ErrNotImplemented feature/method is not implemented yet
ErrNotImplemented = errors.New("Not Implemented")

// ErrNotLockedWritMarker failed to lock WriteMarker
ErrNotLockedWritMarker = errors.New("failed to lock WriteMarker")

// ErrNotUnlockedWritMarker failed to unlock WriteMarker
ErrNotUnlockedWritMarker = errors.New("failed to unlock WriteMarker")

// ErrInvalidHashnode invalid hashnode
ErrInvalidHashnode = errors.New("invalid hashnode")

// ErrBadRequest bad request
ErrBadRequest = errors.New("bad request")

// ErrNotFound ref not found
ErrNotFound = errors.New("ref not found")

// ErrFileOptionNotPermitted requested operation is not allowed on this allocation (file_options)
ErrFileOptionNotPermitted = errors.New("this options for this file is not permitted for this allocation")
)
```

<a name="ContextKey"></a>
## type [ContextKey](<https://github.com/0chain/gosdk/blob/doc/initial/constants/context_key.go#L4>)

ContextKey \- type for key used to store values into context

```go
type ContextKey string
```

<a name="ContextKeyAllocation"></a>

```go
const (
// ContextKeyAllocation
ContextKeyAllocation ContextKey = "allocation"
// ContextKeyAllocationObject
ContextKeyAllocationObject ContextKey = "allocation_object"
// ContextKeyClient
ContextKeyClient ContextKey = "client"
// ContextKeyClientKey
ContextKeyClientKey ContextKey = "client_key"

ContextKeyAllocationID ContextKey = "allocation_id"

// ContextKeyClientSignatureHeaderKey represents key for context value passed with common.ClientSignatureHeader request header.
ContextKeyClientSignatureHeaderKey ContextKey = "signature"
ContextKeyClientSignatureHeaderV2Key ContextKey = "signature_v2"
)
```

Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)
13 changes: 13 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Code generated by gomarkdoc. DO NOT EDIT -->

# core

```go
import "github.com/0chain/gosdk/core"
```

## Index



Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)