doug

package module
v0.0.0-...-65158ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2018 License: GPL-3.0 Imports: 19 Imported by: 0

README

doug

Solidity contract artifact release manager

Build status

Overview

Exposing the JSON ABI for your smart contracts enables opensource contributions, development and makes collaboration easier for your daaps (decentralized applications) . Even if you are not developing an daap for public collaboration it is useful to expose these JSON files within your dev organization. These JSON files are the product of truffle compilation when using truffle to build daaps. This project is a github webhook server written in Go that will upload your configured JSON ABI files to S3 for public consumption whenever you release a new version of your daap.

Usage

Configuration
  • aws: Your s3 regions and bucket configuration The server will attempt to upload each JSON file to all your S3 regions

  • projects: This is the configuration for different projects your server will handle

    • name: The name of the project on github
    • artifacts: File names of the JSON ABI's you need uploaded
[aws]
regions = ["us-east-1"]
bucket = "badgeforce-artifacts"

[[projects]]
name = "badgeforce"
artifacts = ["Issuer.json", "Holder.json"]

[[projects]]
name = "super-daap"
artifacts = ["ABI.json", "Token.json"]

Build and run

$ go build 
$ ./doug

Doug will upload your JSON ABI files to your S3 bucket in this form

bucket-name/project-name/version/file-name

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepo

func CloneRepo(url string, tagName string) (string, error)

CloneRepo . . .

func InitializeConfig

func InitializeConfig(path string)

Initializes configurations

func UploadArtifacts

func UploadArtifacts(event github.ReleaseEvent) []error

UploadArtifacts . . .

Types

type Config

type Config struct {
	S3Conf    s3                       `toml:"s3"`
	Projects  []map[string]interface{} `toml:"projects"`
	Artifacts map[string][]interface{}
	Github    `toml:"github"`
}

Config struct that holds configs

var Configs Config

Configs is the variable that holds config information for microservice

type Github

type Github struct {
	Secret string `toml:"secret"`
}

Github . . .

type HookContext

type HookContext struct {
	Signature string
	Event     string
	Id        string
	Payload   []byte
}

HookContext . . .

func ParseHook

func ParseHook(secret []byte, requestHeaders map[string]string, requestBody string) (*HookContext, error)

ParseHook . . .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL