text:
package main

import (
	"context"
	"flag"
	"log"
	"net/http"
	"os"
	"os/signal"
	"strconv"
	"strings"
	"syscall"
	"time"

	"github.com/hashicorp/logutils"
	"github.com/toyo/epsp"
	"golang.org/x/text/encoding/japanese"
	"golang.org/x/text/transform"
)

var h = NewHandler635()

func main() {
	ctx, cancel := context.WithCancel(context.Background())

	c := make(chan os.Signal, 1)
	signal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGINT)

	var (
		d = flag.Bool(`d`, false, `debug flag`)
	)
	flag.Parse()

	if *d {
		logger := log.New(os.Stderr, ``, log.LstdFlags)
		logger.SetOutput(&logutils.LevelFilter{
			Levels:   []logutils.LogLevel{"ECHO", "DEBUG", "INFO", "WARN", "ERROR"},
			MinLevel: logutils.LogLevel("DEBUG"),
			Writer:   os.Stderr,
		})
		epsp.SetLogger(logger)
	}

	peer, err := epsp.NewPeer(
		/* servers */ []string{
			`www.p2pquake.net:6910`, `p2pquake.dnsalias.net:6910`,
			`p2pquake.dyndns.info:6910`, `p2pquake.ddo.jp:6910`},
		/* region */ `250`,
		/* incoming */ 20,
		[]byte(`-----BEGIN PUBLIC KEY-----
MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC8p/vth2yb/k9x2/PcXKdb6oI3gAbhvr
/HPTOwla5tQHB83LXNF4Y+Sv/Mu4Uu0tKWz02FrLgA5cuJZfba9QNULTZLTNUgUXIB0m/d
q5Rx17IyCfLQ2XngmfFkfnRdRSK7kGnIXvO2/LOKD50JsTf2vz0RQIdw6cEmdl+Aga7i8Q
IBEQ==
-----END PUBLIC KEY-----`),
		[]byte(`-----BEGIN PUBLIC KEY-----
MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDTJKLLO7wjCHz80kpnisqcPDQvA9voNY
5QuAA+bOWeqvl4gmPSiylzQZzldS+n/M5p4o1PRS24WAO+kPBHCf4ETAns8M02MFwxH/Fl
QnbvMfi9zutJkQAu3Hq4293rHz+iCQW/MWYB5IfzFBnWtEdjkhqHsGy6sZMMe+qx/F1rcQ
IBEQ==
-----END PUBLIC KEY-----`),
		usercmd)
	if err != nil {
		log.Fatal(err)
	}

	hs := http.NewServeMux()
	peer.WebSocketAPI(ctx, hs)

	hs.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		http.ServeFile(w, r, "html/index.html")
	})

	hs.HandleFunc("/635.html", func(w http.ResponseWriter, r *http.Request) {
		http.ServeFile(w, r, "html/635.html")
	})

	hs.HandleFunc("/cancel", func(w http.ResponseWriter, r *http.Request) {
		cancel()
	})

	hs.HandleFunc("/send615", func(w http.ResponseWriter, r *http.Request) {
		h.clean635()
		peer.WriteExceptFrom(nil, `615`, `1`, peer.PeerID+`:`+strconv.FormatInt(time.Now().Unix(), 10))
		time.Sleep(2 * time.Second)
		//http.Redirect(w, r, "/635.html", 30)
		w.Header().Add(`Cache-Control`, `no-cache, no-store, must-revalidate`)
		http.ServeFile(w, r, "html/635.html")
	})

	hs.Handle("/635.json", h)

	errCh := make(chan error)
	go func() {
		errCh <- http.ListenAndServe(`:6980`, hs)
	}()

	go func() {
		errCh <- peer.Loop(ctx, 6911 /* tcp port */)
	}()

	select {
	case err := <-errCh:
		log.Fatal(err)
	case s := <-c:
		cancel()
		log.Println(`Terminating by`, s)
		time.Sleep(1 * time.Second)
		os.Exit(0)
	case <-ctx.Done():
		cancel()
		log.Println(`Terminating by`, ctx.Err())
		time.Sleep(1 * time.Second)
		os.Exit(0)
	}
}

func usercmd(code string, recvdata ...string) {

	switch code {
	case "551":
		gaiyob, _, err := transform.String(japanese.ShiftJIS.NewDecoder().Transformer, recvdata[2])
		if err != nil {
			log.Println(err)
		}
		syohsaib, _, err := transform.String(japanese.ShiftJIS.NewDecoder().Transformer, recvdata[3])
		if err != nil {
			log.Println(err)
		}

		gaiyo := strings.Split(string(gaiyob), `,`)
		showsai := strings.Split(string(syohsaib), `,`)

		log.Print("地震情報:" + gaiyo[0] + `、震度` + gaiyo[1] + `の地震がありました。` +
			`震源は` + gaiyo[4] + `、深さは` + gaiyo[5] + `、マグニチュードは` + gaiyo[6] + `と推定されます。`)
		switch gaiyo[2] {
		case `0`:
			log.Print(`津波の心配はありません。`)
		case `1`:
			log.Print(`津波に注意してください。`)
		case `2`:
			log.Print(`津波について調査中です。`)
		case `3`:
			log.Print(`津波について不明です。`)
		}
		if gaiyo[7] == `1` {
			log.Print(`震度が訂正されました。`)
		}
		log.Println(strings.Join(showsai, `,`))
	case "555":
		kanchidata := strings.Split(recvdata[5], `,`)
		log.Println("地震感知情報 " + epsp.Area(kanchidata[1]) + `(PubKey:` + recvdata[2] + `)から` + kanchidata[0])
	case "635":
		h.cmd635(recvdata...)
	default:
		log.Println(`未知コード受信 ` + code + ` n ` + strings.Join(recvdata, `:`))
	}
}

repository: toyo/epsp

repo_name: toyo/epsp


text:
DESCRIPTION = "Jalali implementation of Python's datetime module"
HOMEPAGE = "https://github.com/slashmili/python-jalali"
LICENSE = "Python-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c80be45b33471b4a23cf53d06a8172be"

SRC_URI[sha256sum] = "1dd0ee210160c7bd30002803c443e6260ac602ea65b065652a1d567d3bfdca7a"

PYPI_PACKAGE = "jdatetime"

inherit pypi setuptools3

CLEANBROKEN = "1"

RDEPENDS:${PN} += " \
        ${PYTHON_PN}-modules \
"

repository: openembedded/meta-openembedded

license_type: permissive

repo_name: openembedded/meta-openembedded

branch_name: refs/heads/master

gha_license_id: MIT

gha_language: BitBake

extension: bb


text:
@inproceedings{Lee:2009:LVT:1670252.1670330,
 author = {Lee, Myungho and Lee, Myonghee and Kim, Gerard J.},
 title = {Loosely-coupled vs. Tightly-coupled Mixed Reality: Using the Environment Metaphorically},
 booktitle = {Proceedings of the 8th International Conference on Virtual Reality Continuum and Its Applications in Industry},
 series = {VRCAI '09},
 year = {2009},
 isbn = {978-1-60558-912-1},
 location = {Yokohama, Japan},
 pages = {345--349},
 numpages = {5},
 url = {http://doi.acm.org/10.1145/1670252.1670330},
 doi = {10.1145/1670252.1670330},
 acmid = {1670330},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {interaction medium, mixed reality, registration},
}

license: MIT

gha_language: TeX

extension: bib


text:
/**
 * PANDA 3D SOFTWARE
 * Copyright (c) Carnegie Mellon University.  All rights reserved.
 *
 * All use of this software is subject to the terms of the revised BSD
 * license.  You should have received a copy of this license along
 * with this source code in a file named "LICENSE."
 *
 * @file cullBin.cxx
 * @author drose
 * @date 2002-02-28
 */

#include "cullBin.h"
#include "config_pgraph.h"
#include "pandaNode.h"
#include "geomNode.h"
#include "cullableObject.h"
#include "decalEffect.h"
#include "string_utils.h"

PStatCollector CullBin::_cull_bin_pcollector("Cull:Sort");

TypeHandle CullBin::_type_handle;

/**
 *
 */
CullBin::
~CullBin() {
}

/**
 * Returns a newly-allocated CullBin object that contains a copy of just the
 * subset of the data from this CullBin object that is worth keeping around
 * for next frame.
 *
 * If a particular CullBin object has no data worth preserving till next
 * frame, it is acceptable to return NULL (which is the default behavior of
 * this method).
 */
PT(CullBin) CullBin::
make_next() const {
  return nullptr;
}

/**
 * Called after all the geoms have been added, this indicates that the cull
 * process is finished for this frame and gives the bins a chance to do any
 * post-processing (like sorting) before moving on to draw.
 */
void CullBin::
finish_cull(SceneSetup *, Thread *) {
}

/**
 * Returns a special scene graph constructed to represent the results of the
 * cull.  This will be a single node with a list of GeomNode children, which
 * represent the various geom objects discovered by the cull.
 *
 * This is useful mainly for high-level debugging and abstraction tools; it
 * should not be mistaken for the low-level cull result itself.  For the low-
 * level cull result, use draw() to efficiently draw the culled scene.
 */
PT(PandaNode) CullBin::
make_result_graph() {
  PT(PandaNode) root_node = new PandaNode(get_name());
  ResultGraphBuilder builder(root_node);
  fill_result_graph(builder);
  return root_node;
}

/**
 *
 */
CullBin::ResultGraphBuilder::
ResultGraphBuilder(PandaNode *root_node) :
  _object_index(0),
  _root_node(root_node)
{
}

/**
 * Called in fill_result_graph() by a derived CullBin class to add each culled
 * object to the result returned by make_result_graph().
 */
void CullBin::ResultGraphBuilder::
add_object(CullableObject *object) {
  if (_current_transform != object->_internal_transform ||
      _current_state != object->_state) {
    // Create a new GeomNode to hold the net transform and state.  We choose
    // to create a new GeomNode for each new state, to make it clearer to the
    // observer when the state changes.
    _current_transform = object->_internal_transform;
    _current_state = object->_state;
    _current_node = new GeomNode("object_" + format_string(_object_index));
    _root_node->add_child(_current_node);
    _current_node->set_transform(_current_transform);
    _current_node->set_state(_current_state);
  }

  record_one_object(_current_node, object);
  ++_object_index;
}

/**
 * Records a single object.
 */
void CullBin::ResultGraphBuilder::
record_one_object(GeomNode *node, CullableObject *object) {
  PT(Geom) new_geom = object->_geom->make_copy();
  new_geom->set_vertex_data(object->_munged_data);
  node->add_geom(new_geom);
}

gha_license_id: NOASSERTION

extension: cxx


text:
@InProceedings{guha09a,
  title = {Visualization Databases for the Analysis of Large Complex Datasets},
  author = {Saptarshi Guha and Paul Kidwell and Ryan P. Hafen and William S. Cleveland},
  pages = {193--200},
  abstract = {Comprehensive visualization that preserves the information in a large complex dataset requires a visualization database (VDB): many displays, some with many pages, and with one or more panels per page. A single display using a specific display method results from partitioning the data into subsets, sampling the subsets, and applying the method to each sample, typically one per panel. The time of the analyst to generate a display is not increased by choosing a large sample over a small one. Displays and display viewers can be designed to allow rapid scanning. Often, it is not necessary to view every page of a display. VDBs, already successful just with off-the-shelf tools, can be greatly improved by research that rethinks all of the areas of data visualization in the context of VDBs.},
  pdf = {http://jmlr.org/proceedings/papers/v5/guha09a/guha09a.pdf},
}

repository: mreid/papersite

repo_name: mreid/papersite


text:
SUMMARY = "MPEG Audio Decoder library"
HOMEPAGE = "http://sourceforge.net/projects/mad/"
BUGTRACKER = "http://sourceforge.net/tracker/?group_id=12349&atid=112349"
LICENSE = "GPL-2.0-or-later"
LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
    file://COPYRIGHT;md5=8e55eb14894e782b84488d5a239bc23d \
    file://version.h;beginline=1;endline=8;md5=aa07311dd39288d4349f28e1de516454"
SECTION = "libs"
DEPENDS = "libid3tag"
PR = "r3"

SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libmad-${PV}.tar.gz \
    file://no-force-mem.patch \
    file://add-pkgconfig.patch \
    file://fix_for_mips_with_gcc-4.5.0.patch \
    file://obsolete_automake_macros.patch \
    file://automake-foreign.patch \
    file://0001-configure-Respect-the-cflags-from-environment.patch \
"
SRC_URI:append:toolchain-clang = " file://0004-Remove-clang-unsupported-compiler-flags.patch "

SRC_URI[md5sum] = "1be543bc30c56fb6bea1d7bf6a64e66c"
SRC_URI[sha256sum] = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690"

S = "${WORKDIR}/libmad-${PV}"

inherit autotools pkgconfig

EXTRA_OECONF = "-enable-speed --enable-shared"
EXTRA_OECONF:append:arm = " --enable-fpm=arm"

do_configure:prepend () {
#   damn picky automake...
    touch NEWS AUTHORS ChangeLog
}

ARM_INSTRUCTION_SET = "arm"


text:
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/HUD.h"
#include "TrainingHUD.generated.h"

/**
 *
 */
UCLASS()
class BOSSBATTLE_API ATrainingHUD : public AHUD
{
	GENERATED_BODY()
private:
	void PostInitializeComponents() override;

	//training stats widget
	UPROPERTY(EditDefaultsOnly, Category = UI)
	TSubclassOf<class UTrainingStatsWidget> TrainingStatsWidgetTemplate;

	//training stats widget template
	class UTrainingStatsWidget* TrainingStatsWidget = nullptr;

};

extension: h


text:
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: envoy/extensions/access_loggers/grpc/v3/als.proto

package envoy_extensions_access_loggers_grpc_v3

import (
	fmt "fmt"
	_ "github.com/cncf/udpa/go/udpa/annotations"
	v3 "github.com/datawire/ambassador/pkg/api/envoy/config/core/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	proto "github.com/gogo/protobuf/proto"
	types "github.com/gogo/protobuf/types"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

// Configuration for the built-in *envoy.http_grpc_access_log*
// :ref:`AccessLog <envoy_api_msg_config.accesslog.v3.AccessLog>`. This configuration will
// populate :ref:`StreamAccessLogsMessage.http_logs
// <envoy_api_field_service.accesslog.v3.StreamAccessLogsMessage.http_logs>`.
// [#extension: envoy.access_loggers.http_grpc]
type HttpGrpcAccessLogConfig struct {
	CommonConfig *CommonGrpcAccessLogConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"`
	// Additional request headers to log in :ref:`HTTPRequestProperties.request_headers
	// <envoy_api_field_data.accesslog.v3.HTTPRequestProperties.request_headers>`.
	AdditionalRequestHeadersToLog []string `protobuf:"bytes,2,rep,name=additional_request_headers_to_log,json=additionalRequestHeadersToLog,proto3" json:"additional_request_headers_to_log,omitempty"`
	// Additional response headers to log in :ref:`HTTPResponseProperties.response_headers
	// <envoy_api_field_data.accesslog.v3.HTTPResponseProperties.response_headers>`.
	AdditionalResponseHeadersToLog []string `protobuf:"bytes,3,rep,name=additional_response_headers_to_log,json=additionalResponseHeadersToLog,proto3" json:"additional_response_headers_to_log,omitempty"`
	// Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers
	// <envoy_api_field_data.accesslog.v3.HTTPResponseProperties.response_trailers>`.
	AdditionalResponseTrailersToLog []string `protobuf:"bytes,4,rep,name=additional_response_trailers_to_log,json=additionalResponseTrailersToLog,proto3" json:"additional_response_trailers_to_log,omitempty"`
	XXX_NoUnkeyedLiteral            struct{} `json:"-"`
	XXX_unrecognized                []byte   `json:"-"`
	XXX_sizecache                   int32    `json:"-"`
}

func (m *HttpGrpcAccessLogConfig) Reset()         { *m = HttpGrpcAccessLogConfig{} }
func (m *HttpGrpcAccessLogConfig) String() string { return proto.CompactTextString(m) }
func (*HttpGrpcAccessLogConfig) ProtoMessage()    {}
func (*HttpGrpcAccessLogConfig) Descriptor() ([]byte, []int) {
	return fileDescriptor_d3685c6e6be71fba, []int{0}
}
func (m *HttpGrpcAccessLogConfig) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *HttpGrpcAccessLogConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_HttpGrpcAccessLogConfig.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *HttpGrpcAccessLogConfig) XXX_Merge(src proto.Message) {
	xxx_messageInfo_HttpGrpcAccessLogConfig.Merge(m, src)
}
func (m *HttpGrpcAccessLogConfig) XXX_Size() int {
	return m.Size()
}
func (m *HttpGrpcAccessLogConfig) XXX_DiscardUnknown() {
	xxx_messageInfo_HttpGrpcAccessLogConfig.DiscardUnknown(m)
}

var xxx_messageInfo_HttpGrpcAccessLogConfig proto.InternalMessageInfo

func (m *HttpGrpcAccessLogConfig) GetCommonConfig() *CommonGrpcAccessLogConfig {
	if m != nil {
		return m.CommonConfig
	}
	return nil
}

func (m *HttpGrpcAccessLogConfig) GetAdditionalRequestHeadersToLog() []string {
	if m != nil {
		return m.AdditionalRequestHeadersToLog
	}
	return nil
}

func (m *HttpGrpcAccessLogConfig) GetAdditionalResponseHeadersToLog() []string {
	if m != nil {
		return m.AdditionalResponseHeadersToLog
	}
	return nil
}

func (m *HttpGrpcAccessLogConfig) GetAdditionalResponseTrailersToLog() []string {
	if m != nil {
		return m.AdditionalResponseTrailersToLog
	}
	return nil
}

// Configuration for the built-in *envoy.tcp_grpc_access_log* type. This configuration will
// populate *StreamAccessLogsMessage.tcp_logs*.
// [#extension: envoy.access_loggers.tcp_grpc]
type TcpGrpcAccessLogConfig struct {
	CommonConfig         *CommonGrpcAccessLogConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

func (m *TcpGrpcAccessLogConfig) Reset()         { *m = TcpGrpcAccessLogConfig{} }
func (m *TcpGrpcAccessLogConfig) String() string { return proto.CompactTextString(m) }
func (*TcpGrpcAccessLogConfig) ProtoMessage()    {}
func (*TcpGrpcAccessLogConfig) Descriptor() ([]byte, []int) {
	return fileDescriptor_d3685c6e6be71fba, []int{1}
}
func (m *TcpGrpcAccessLogConfig) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *TcpGrpcAccessLogConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_TcpGrpcAccessLogConfig.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *TcpGrpcAccessLogConfig) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TcpGrpcAccessLogConfig.Merge(m, src)
}
func (m *TcpGrpcAccessLogConfig) XXX_Size() int {
	return m.Size()
}
func (m *TcpGrpcAccessLogConfig) XXX_DiscardUnknown() {
	xxx_messageInfo_TcpGrpcAccessLogConfig.DiscardUnknown(m)
}

var xxx_messageInfo_TcpGrpcAccessLogConfig proto.InternalMessageInfo

func (m *TcpGrpcAccessLogConfig) GetCommonConfig() *CommonGrpcAccessLogConfig {
	if m != nil {
		return m.CommonConfig
	}
	return nil
}

// Common configuration for gRPC access logs.
// [#next-free-field: 6]
type CommonGrpcAccessLogConfig struct {
	// The friendly name of the access log to be returned in :ref:`StreamAccessLogsMessage.Identifier
	// <envoy_api_msg_service.accesslog.v3.StreamAccessLogsMessage.Identifier>`. This allows the
	// access log server to differentiate between different access logs coming from the same Envoy.
	LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"`
	// The gRPC service for the access log service.
	GrpcService *v3.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"`
	// Interval for flushing access logs to the gRPC stream. Logger will flush requests every time
	// this interval is elapsed, or when batch size limit is hit, whichever comes first. Defaults to
	// 1 second.
	BufferFlushInterval *types.Duration `protobuf:"bytes,3,opt,name=buffer_flush_interval,json=bufferFlushInterval,proto3" json:"buffer_flush_interval,omitempty"`
	// Soft size limit in bytes for access log entries buffer. Logger will buffer requests until
	// this limit it hit, or every time flush interval is elapsed, whichever comes first. Setting it
	// to zero effectively disables the batching. Defaults to 16384.
	BufferSizeBytes *types.UInt32Value `protobuf:"bytes,4,opt,name=buffer_size_bytes,json=bufferSizeBytes,proto3" json:"buffer_size_bytes,omitempty"`
	// Additional filter state objects to log in :ref:`filter_state_objects
	// <envoy_api_field_data.accesslog.v3.AccessLogCommon.filter_state_objects>`.
	// Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object.
	FilterStateObjectsToLog []string `protobuf:"bytes,5,rep,name=filter_state_objects_to_log,json=filterStateObjectsToLog,proto3" json:"filter_state_objects_to_log,omitempty"`
	XXX_NoUnkeyedLiteral    struct{} `json:"-"`
	XXX_unrecognized        []byte   `json:"-"`
	XXX_sizecache           int32    `json:"-"`
}

func (m *CommonGrpcAccessLogConfig) Reset()         { *m = CommonGrpcAccessLogConfig{} }
func (m *CommonGrpcAccessLogConfig) String() string { return proto.CompactTextString(m) }
func (*CommonGrpcAccessLogConfig) ProtoMessage()    {}
func (*CommonGrpcAccessLogConfig) Descriptor() ([]byte, []int) {
	return fileDescriptor_d3685c6e6be71fba, []int{2}
}
func (m *CommonGrpcAccessLogConfig) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *CommonGrpcAccessLogConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_CommonGrpcAccessLogConfig.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *CommonGrpcAccessLogConfig) XXX_Merge(src proto.Message) {
	xxx_messageInfo_CommonGrpcAccessLogConfig.Merge(m, src)
}
func (m *CommonGrpcAccessLogConfig) XXX_Size() int {
	return m.Size()
}
func (m *CommonGrpcAccessLogConfig) XXX_DiscardUnknown() {
	xxx_messageInfo_CommonGrpcAccessLogConfig.DiscardUnknown(m)
}

var xxx_messageInfo_CommonGrpcAccessLogConfig proto.InternalMessageInfo

func (m *CommonGrpcAccessLogConfig) GetLogName() string {
	if m != nil {
		return m.LogName
	}
	return ""
}

func (m *CommonGrpcAccessLogConfig) GetGrpcService() *v3.GrpcService {
	if m != nil {
		return m.GrpcService
	}
	return nil
}

func (m *CommonGrpcAccessLogConfig) GetBufferFlushInterval() *types.Duration {
	if m != nil {
		return m.BufferFlushInterval
	}
	return nil
}

func (m *CommonGrpcAccessLogConfig) GetBufferSizeBytes() *types.UInt32Value {
	if m != nil {
		return m.BufferSizeBytes
	}
	return nil
}

func (m *CommonGrpcAccessLogConfig) GetFilterStateObjectsToLog() []string {
	if m != nil {
		return m.FilterStateObjectsToLog
	}
	return nil
}

func init() {
	proto.RegisterType((*HttpGrpcAccessLogConfig)(nil), "envoy.extensions.access_loggers.grpc.v3.HttpGrpcAccessLogConfig")
	proto.RegisterType((*TcpGrpcAccessLogConfig)(nil), "envoy.extensions.access_loggers.grpc.v3.TcpGrpcAccessLogConfig")
	proto.RegisterType((*CommonGrpcAccessLogConfig)(nil), "envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig")
}

func init() {
	proto.RegisterFile("envoy/extensions/access_loggers/grpc/v3/als.proto", fileDescriptor_d3685c6e6be71fba)
}

var fileDescriptor_d3685c6e6be71fba = []byte{
	// 633 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x93, 0xd1, 0x4e, 0x13, 0x4f,
	0x14, 0xc6, 0xff, 0xdb, 0xc2, 0x1f, 0x18, 0x30, 0xea, 0x1a, 0xa5, 0xa0, 0x56, 0xa8, 0x17, 0x12,
	0x2f, 0x66, 0xb5, 0x0d, 0xd1, 0x10, 0x6f, 0x28, 0x46, 0x8b, 0x21, 0x40, 0x0a, 0xea, 0xe5, 0x66,
	0xba, 0x3d, 0x1d, 0xc6, 0x4c, 0x67, 0x96, 0x99, 0xd9, 0x15, 0x78, 0x02, 0xe3, 0x23, 0xf8, 0x08,
	0xc4, 0xc7, 0xd0, 0xc4, 0x4b, 0x1f, 0xc1, 0xf0, 0x18, 0x5c, 0x99, 0x99, 0x59, 0xa4, 0x15, 0x9a,
	0x70, 0xe9, 0x5d, 0xbb, 0xf3, 0x7d, 0xbf, 0x33, 0xdf, 0x9c, 0x73, 0xd0, 0x53, 0x10, 0xb9, 0x3c,
	0x8c, 0xe0, 0xc0, 0x80, 0xd0, 0x4c, 0x0a, 0x1d, 0x91, 0x24, 0x01, 0xad, 0x63, 0x2e, 0x29, 0x05,
	0xa5, 0x23, 0xaa, 0xd2, 0x24, 0xca, 0x1b, 0x11, 0xe1, 0x1a, 0xa7, 0x4a, 0x1a, 0x19, 0x3e, 0x72,
	0x16, 0x7c, 0x6e, 0xc1, 0xc3, 0x16, 0x6c, 0x2d, 0x38, 0x6f, 0xcc, 0x7b, 0x61, 0x94, 0x48, 0xd1,
	0x63, 0x34, 0x4a, 0xa4, 0x02, 0x0b, 0xb2, 0xa7, 0xb1, 0x06, 0x95, 0xb3, 0x04, 0x3c, 0x71, 0xbe,
	0x4a, 0xa5, 0xa4, 0x1c, 0x22, 0xf7, 0xaf, 0x93, 0xf5, 0xa2, 0x6e, 0xa6, 0x88, 0x61, 0x52, 0x8c,
	0x3a, 0xff, 0xa8, 0x48, 0x9a, 0xda, 0x52, 0xfe, 0x7c, 0x31, 0xeb, 0xa6, 0x24, 0x22, 0x42, 0x48,
	0xe3, 0x6c, 0x3a, 0xca, 0x41, 0xd9, 0xab, 0x31, 0x41, 0x0b, 0xc9, 0x6c, 0x4e, 0x38, 0xeb, 0x12,
	0x03, 0xd1, 0xd9, 0x0f, 0x7f, 0x50, 0x3b, 0x2e, 0xa3, 0xd9, 0x96, 0x31, 0xe9, 0x6b, 0x95, 0x26,
	0xab, 0x2e, 0xc7, 0x86, 0xa4, 0x6b, 0xee, 0xca, 0xe1, 0x3e, 0xba, 0x96, 0xc8, 0x7e, 0x5f, 0x8a,
	0xd8, 0x67, 0xa8, 0x04, 0x0b, 0xc1, 0xd2, 0x74, 0xbd, 0x89, 0xaf, 0xf8, 0x02, 0x78, 0xcd, 0xb9,
	0x2f, 0x41, 0x37, 0x27, 0x4f, 0x9b, 0xe3, 0x9f, 0x83, 0xd2, 0x8d, 0xa0, 0x3d, 0xe3, 0x4b, 0x14,
	0x25, 0x5b, 0x68, 0x91, 0x74, 0xbb, 0xcc, 0xa6, 0x20, 0x3c, 0x56, 0xb0, 0x9f, 0x81, 0x36, 0xf1,
	0x1e, 0x90, 0x2e, 0x28, 0x1d, 0x1b, 0x69, 0x4b, 0x54, 0x4a, 0x0b, 0xe5, 0xa5, 0xa9, 0xf6, 0xfd,
	0x73, 0x61, 0xdb, 0xeb, 0x5a, 0x5e, 0xb6, 0x2b, 0x37, 0x24, 0x0d, 0xdf, 0xa0, 0xda, 0x10, 0x49,
	0xa7, 0x52, 0x68, 0xf8, 0x1b, 0x55, 0x76, 0xa8, 0xea, 0x20, 0xca, 0x0b, 0x87, 0x58, 0x1b, 0xe8,
	0xe1, 0x65, 0x2c, 0xa3, 0x08, 0xe3, 0x03, 0xb0, 0x31, 0x07, 0x7b, 0x70, 0x11, 0xb6, 0x5b, 0x08,
	0x1d, 0x6d, 0xe5, 0xf9, 0x97, 0xef, 0x9f, 0xaa, 0x8d, 0x62, 0xf4, 0xb0, 0x7f, 0xda, 0xe2, 0x05,
	0xb9, 0xa4, 0x38, 0xaf, 0xe3, 0x11, 0x0d, 0xa9, 0x7d, 0x0b, 0xd0, 0x9d, 0xdd, 0xe4, 0x1f, 0xe9,
	0xd5, 0xca, 0x33, 0x9b, 0xa3, 0x8e, 0x9e, 0x8c, 0xce, 0x71, 0xf9, 0x5d, 0x6b, 0x5f, 0xcb, 0x68,
	0x6e, 0x64, 0xb9, 0xb0, 0x86, 0x26, 0xb9, 0xa4, 0xb1, 0x20, 0x7d, 0x70, 0x21, 0xa6, 0x9a, 0x13,
	0xa7, 0xcd, 0x31, 0x55, 0x5a, 0x08, 0xda, 0x13, 0x5c, 0xd2, 0x4d, 0xd2, 0x87, 0x70, 0x13, 0xcd,
	0x0c, 0xee, 0x51, 0xa5, 0xe4, 0xc2, 0x2e, 0xe2, 0xa1, 0xab, 0xd8, 0x8d, 0xb3, 0xc9, 0x6c, 0x91,
	0x1d, 0x2f, 0x1c, 0xc8, 0x32, 0x4d, 0xcf, 0x3f, 0x87, 0xef, 0xd1, 0xed, 0x4e, 0xd6, 0xeb, 0x81,
	0x8a, 0x7b, 0x3c, 0xd3, 0x7b, 0x31, 0x13, 0x06, 0x54, 0x4e, 0x78, 0xa5, 0xec, 0xc0, 0x73, 0xd8,
	0x6f, 0x20, 0x3e, 0xdb, 0x40, 0xfc, 0xb2, 0xd8, 0x50, 0x07, 0x3c, 0x0e, 0x4a, 0x8f, 0xff, 0x6b,
	0xdf, 0xf2, 0x84, 0x57, 0x16, 0xb0, 0x5e, 0xf8, 0xc3, 0x16, 0xba, 0x59, 0x80, 0x35, 0x3b, 0x82,
	0xb8, 0x73, 0x68, 0x40, 0x57, 0xc6, 0x1c, 0xf4, 0xde, 0x05, 0xe8, 0xdb, 0x75, 0x61, 0x1a, 0xf5,
	0x77, 0x84, 0x67, 0xd0, 0xbe, 0xee, 0x6d, 0x3b, 0xec, 0x08, 0x9a, 0xd6, 0x14, 0xbe, 0x40, 0x77,
	0x7b, 0x8c, 0x1b, 0x4b, 0x32, 0xc4, 0x40, 0x2c, 0x3b, 0x1f, 0x20, 0x31, 0x7f, 0x66, 0x6f, 0xdc,
	0xcd, 0xde, 0xac, 0x97, 0xec, 0x58, 0xc5, 0x96, 0x17, 0xf8, 0x99, 0x5b, 0xb1, 0xbd, 0x5a, 0x46,
	0x8d, 0xd1, 0xbd, 0x1a, 0xdd, 0xff, 0xad, 0x1f, 0x27, 0xd5, 0xe0, 0xe7, 0x49, 0x35, 0xf8, 0x75,
	0x52, 0x0d, 0xd0, 0x32, 0x93, 0xfe, 0x99, 0x53, 0x25, 0x0f, 0x0e, 0xaf, 0x3a, 0x5e, 0xcd, 0xc9,
	0x55, 0xae, 0xb7, 0x6d, 0xd0, 0xed, 0xa0, 0xf3, 0xbf, 0x4b, 0xdc, 0xf8, 0x1d, 0x00, 0x00, 0xff,
	0xff, 0x7f, 0xda, 0x1d, 0xac, 0x7d, 0x05, 0x00, 0x00,
}

func (m *HttpGrpcAccessLogConfig) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *HttpGrpcAccessLogConfig) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *HttpGrpcAccessLogConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.XXX_unrecognized != nil {
		i -= len(m.XXX_unrecognized)
		copy(dAtA[i:], m.XXX_unrecognized)
	}
	if len(m.AdditionalResponseTrailersToLog) > 0 {
		for iNdEx := len(m.AdditionalResponseTrailersToLog) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.AdditionalResponseTrailersToLog[iNdEx])
			copy(dAtA[i:], m.AdditionalResponseTrailersToLog[iNdEx])
			i = encodeVarintAls(dAtA, i, uint64(len(m.AdditionalResponseTrailersToLog[iNdEx])))
			i--
			dAtA[i] = 0x22
		}
	}
	if len(m.AdditionalResponseHeadersToLog) > 0 {
		for iNdEx := len(m.AdditionalResponseHeadersToLog) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.AdditionalResponseHeadersToLog[iNdEx])
			copy(dAtA[i:], m.AdditionalResponseHeadersToLog[iNdEx])
			i = encodeVarintAls(dAtA, i, uint64(len(m.AdditionalResponseHeadersToLog[iNdEx])))
			i--
			dAtA[i] = 0x1a
		}
	}
	if len(m.AdditionalRequestHeadersToLog) > 0 {
		for iNdEx := len(m.AdditionalRequestHeadersToLog) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.AdditionalRequestHeadersToLog[iNdEx])
			copy(dAtA[i:], m.AdditionalRequestHeadersToLog[iNdEx])
			i = encodeVarintAls(dAtA, i, uint64(len(m.AdditionalRequestHeadersToLog[iNdEx])))
			i--
			dAtA[i] = 0x12
		}
	}
	if m.CommonConfig != nil {
		{
			size, err := m.CommonConfig.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintAls(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *TcpGrpcAccessLogConfig) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *TcpGrpcAccessLogConfig) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *TcpGrpcAccessLogConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.XXX_unrecognized != nil {
		i -= len(m.XXX_unrecognized)
		copy(dAtA[i:], m.XXX_unrecognized)
	}
	if m.CommonConfig != nil {
		{
			size, err := m.CommonConfig.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintAls(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *CommonGrpcAccessLogConfig) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *CommonGrpcAccessLogConfig) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *CommonGrpcAccessLogConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.XXX_unrecognized != nil {
		i -= len(m.XXX_unrecognized)
		copy(dAtA[i:], m.XXX_unrecognized)
	}
	if len(m.FilterStateObjectsToLog) > 0 {
		for iNdEx := len(m.FilterStateObjectsToLog) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.FilterStateObjectsToLog[iNdEx])
			copy(dAtA[i:], m.FilterStateObjectsToLog[iNdEx])
			i = encodeVarintAls(dAtA, i, uint64(len(m.FilterStateObjectsToLog[iNdEx])))
			i--
			dAtA[i] = 0x2a
		}
	}
	if m.BufferSizeBytes != nil {
		{
			size, err := m.BufferSizeBytes.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintAls(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x22
	}
	if m.BufferFlushInterval != nil {
		{
			size, err := m.BufferFlushInterval.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintAls(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x1a
	}
	if m.GrpcService != nil {
		{
			size, err := m.GrpcService.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintAls(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if len(m.LogName) > 0 {
		i -= len(m.LogName)
		copy(dAtA[i:], m.LogName)
		i = encodeVarintAls(dAtA, i, uint64(len(m.LogName)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintAls(dAtA []byte, offset int, v uint64) int {
	offset -= sovAls(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *HttpGrpcAccessLogConfig) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.CommonConfig != nil {
		l = m.CommonConfig.Size()
		n += 1 + l + sovAls(uint64(l))
	}
	if len(m.AdditionalRequestHeadersToLog) > 0 {
		for _, s := range m.AdditionalRequestHeadersToLog {
			l = len(s)
			n += 1 + l + sovAls(uint64(l))
		}
	}
	if len(m.AdditionalResponseHeadersToLog) > 0 {
		for _, s := range m.AdditionalResponseHeadersToLog {
			l = len(s)
			n += 1 + l + sovAls(uint64(l))
		}
	}
	if len(m.AdditionalResponseTrailersToLog) > 0 {
		for _, s := range m.AdditionalResponseTrailersToLog {
			l = len(s)
			n += 1 + l + sovAls(uint64(l))
		}
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *TcpGrpcAccessLogConfig) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.CommonConfig != nil {
		l = m.CommonConfig.Size()
		n += 1 + l + sovAls(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *CommonGrpcAccessLogConfig) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.LogName)
	if l > 0 {
		n += 1 + l + sovAls(uint64(l))
	}
	if m.GrpcService != nil {
		l = m.GrpcService.Size()
		n += 1 + l + sovAls(uint64(l))
	}
	if m.BufferFlushInterval != nil {
		l = m.BufferFlushInterval.Size()
		n += 1 + l + sovAls(uint64(l))
	}
	if m.BufferSizeBytes != nil {
		l = m.BufferSizeBytes.Size()
		n += 1 + l + sovAls(uint64(l))
	}
	if len(m.FilterStateObjectsToLog) > 0 {
		for _, s := range m.FilterStateObjectsToLog {
			l = len(s)
			n += 1 + l + sovAls(uint64(l))
		}
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func sovAls(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozAls(x uint64) (n int) {
	return sovAls(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *HttpGrpcAccessLogConfig) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowAls
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: HttpGrpcAccessLogConfig: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: HttpGrpcAccessLogConfig: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CommonConfig", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.CommonConfig == nil {
				m.CommonConfig = &CommonGrpcAccessLogConfig{}
			}
			if err := m.CommonConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field AdditionalRequestHeadersToLog", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.AdditionalRequestHeadersToLog = append(m.AdditionalRequestHeadersToLog, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field AdditionalResponseHeadersToLog", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.AdditionalResponseHeadersToLog = append(m.AdditionalResponseHeadersToLog, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field AdditionalResponseTrailersToLog", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.AdditionalResponseTrailersToLog = append(m.AdditionalResponseTrailersToLog, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAls(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAls
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthAls
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *TcpGrpcAccessLogConfig) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowAls
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: TcpGrpcAccessLogConfig: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: TcpGrpcAccessLogConfig: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CommonConfig", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.CommonConfig == nil {
				m.CommonConfig = &CommonGrpcAccessLogConfig{}
			}
			if err := m.CommonConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAls(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAls
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthAls
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *CommonGrpcAccessLogConfig) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowAls
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: CommonGrpcAccessLogConfig: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: CommonGrpcAccessLogConfig: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LogName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.LogName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field GrpcService", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.GrpcService == nil {
				m.GrpcService = &v3.GrpcService{}
			}
			if err := m.GrpcService.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field BufferFlushInterval", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.BufferFlushInterval == nil {
				m.BufferFlushInterval = &types.Duration{}
			}
			if err := m.BufferFlushInterval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field BufferSizeBytes", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.BufferSizeBytes == nil {
				m.BufferSizeBytes = &types.UInt32Value{}
			}
			if err := m.BufferSizeBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field FilterStateObjectsToLog", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAls
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthAls
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthAls
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.FilterStateObjectsToLog = append(m.FilterStateObjectsToLog, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAls(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAls
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthAls
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipAls(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowAls
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowAls
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowAls
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthAls
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupAls
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthAls
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthAls        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAls          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAls = fmt.Errorf("proto: unexpected end of group")
)

repository: aallbrig/ambassador

repo_name: aallbrig/ambassador

extension: go


text:
@article{Soldatos:2014,
  author    = {John Soldatos and
               Nikos Kefalakis and
               Martin Serrano and
               Manfred Hauswirth},
  title     = {Design principles for utility-driven services and cloud-based computing
               modelling for the Internet of Things},
  journal   = {{IJWGS}},
  volume    = {10},
  number    = {2/3},
  pages     = {139--167},
  year      = {2014},
  url       = {http://dx.doi.org/10.1504/IJWGS.2014.060254},
  doi       = {10.1504/IJWGS.2014.060254},
  timestamp = {Mon, 02 Jun 2014 09:47:44 +0200},
  biburl    = {http://dblp.uni-trier.de/rec/bib/journals/ijwgs/SoldatosKSH14},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}

@article{owasp201410,
    title={10 2014},
    author={OWASP, Top},
    journal={The Ten Most Critical Internet of Things Security Risks},
    url={https://www.owasp.org/index.php/OWASP_Internet_of_Things_Project#tab=Top_10_IoT_Vulnerabilities__282014_29},
    year={2014}
}

@article{perera2014context,
  title={Context aware computing for the internet of things: A survey},
  author={Perera, Charith and Zaslavsky, Arkady and Christen, Peter and Georgakopoulos, Dimitrios},
  journal={Communications Surveys \& Tutorials, IEEE},
  volume={16},
  number={1},
  pages={414--454},
  url={http://arxiv.org/pdf/1305.0982.pdf},
  year={2014},
  publisher={IEEE}
}

@article{yang2015security,
  title={Security and privacy in mobile crowdsourcing networks: challenges and opportunities},
  author={Yang, Kan and Zhang, Kuan and Ren, Ju and Shen, Xuemin},
  journal={Communications Magazine, IEEE},
  volume={53},
  number={8},
  pages={75--81},
  year={2015},
  publisher={IEEE}
}

@misc{cisco:whitepaper,
  title         = "The {Internet of Things: How the Next Evolution of the Internet Is Changing Everything}",
  author        = "D. Evans",
  howpublished  = "White Paper",
  organization  = "Cisco",
  month         = "April",
  year          = "2011"
}

@INPROCEEDINGS{BigDataSurvey,
author={Sagiroglu, S. and Sinanc, D.},
booktitle={Collaboration Technologies and Systems (CTS), 2013 International Conference on},
title={Big data: A review},
year={2013},
pages={42-47},
}

@article{Armbrust:Cloud,
 author = {Armbrust, Michael and Fox, Armando and Griffith, Rean and Joseph, Anthony D. and Katz, Randy and Konwinski, Andy and Lee, Gunho and Patterson, David and Rabkin, Ariel and Stoica, Ion and Zaharia, Matei},
 title = {A view of cloud computing},
 journal = {Commun. ACM},
 issue_date = {April 2010},
 volume = {53},
 number = {4},
 month = apr,
 year = {2010},
 issn = {0001-0782},
 pages = {50--58},
 numpages = {9},
 acmid = {1721672},
 publisher = {ACM},
 address = {New York, NY, USA},
}

@article{Antonic2015FGCS,
title = "A mobile crowd sensing ecosystem enabled by CUPUS: Cloud-based publish/subscribe middleware for the Internet of Things ",
journal = "Future Generation Computer Systems ",
volume = "",
number = "",
pages = " - ",
year = "2015",
note = "",
issn = "0167-739X",
doi = "http://dx.doi.org/10.1016/j.future.2015.08.005",
url = "http://www.sciencedirect.com/science/article/pii/S0167739X15002575",
author = "Aleksandar Antonić and Martina Marjanović and Krešimir Pripužić and Ivana Podnar Žarko",
}

@ARTICLE{Serrano2015VDK,
author={Serrano, M. and Hoan Nguyen Mau Quoc and Danh Le Phuoc and Hauswirth, M. and Soldatos, J. and Kefalakis, N. and Jayaraman, P.P. and Zaslavsky, A.},
journal={Selected Areas in Communications, IEEE Journal on},
title={Defining the Stack for Service Delivery Models and Interoperability in the Internet of Things: A Practical Case With OpenIoT-VDK},
year={2015},
volume={33},
number={4},
pages={676-689},
keywords={Internet of Things;fault tolerant computing;open systems;Internet of Things;IoT instances;IoT service delivery models;IoT stack;OpenIoT local instantiation;OpenIoT-VDK;Virtual Development Kit;autonomic behavior;interoperability;service delivery models;Data models;Electronic publishing;Information services;Internet of Things;Interoperability;Middleware;Internet of Things;Sensor network;Stream query processing;cloud computing;stream query processing},
doi={10.1109/JSAC.2015.2393491},
ISSN={0733-8716},
month={April},}

@article{Christin:2011:Survey,
 author = {Christin, Delphine and Reinhardt, Andreas and Kanhere, Salil S. and Hollick, Matthias},
 title = {A Survey on Privacy in Mobile Participatory Sensing Applications},
 journal = {J. Syst. Softw.},
 issue_date = {November, 2011},
 volume = {84},
 number = {11},
 month = nov,
 year = {2011},
 issn = {0164-1212},
 pages = {1928--1946},
 numpages = {19},
 doi = {10.1016/j.jss.2011.06.073},
 acmid = {2031055},
 publisher = {Elsevier Science Inc.},
 address = {New York, NY, USA},
}

@ARTICLE{Li:2015:Privacy,
author={Qinghua Li and Guohong Cao},
journal={Communications Magazine, IEEE},
title={Privacy-preserving participatory sensing},
year={2015},
volume={53},
number={8},
pages={68-74},
keywords={data protection;mobile handsets;data protection privacy;incentive issue;mobile device proliferation;privacy-preserving participatory sensing;Encryption;Mobile handsets;Network security;Peer-to-peer computing;Privacy;Sensors},
doi={10.1109/MCOM.2015.7180510},
ISSN={0163-6804},
month={August},}

@INPROCEEDINGS{Zhao:2013:Survey,
author={Kai Zhao and Lina Ge},
booktitle={Computational Intelligence and Security (CIS), 2013 9th International Conference on},
title={A Survey on the Internet of Things Security},
year={2013},
pages={663-667},
doi={10.1109/CIS.2013.145},
month={Dec},}

@article{zhang:2011:architecture,
  title={Security architecture on the trusting internet of things},
  author={Zhang, Bing and Ma, Xin-Xin and Qin, Zhi-Guang},
  journal={Journal of Electronic Science and Technology},
  volume={9},
  number={4},
  pages={364--367},
  year={2011}
}

@INPROCEEDINGS{Suo,
author={Hui Suo and Jiafu Wan and Caifeng Zou and Jianqi Liu},
booktitle={Computer Science and Electronics Engineering (ICCSEE), 2012 International Conference on},
title={Security in the Internet of Things: A Review},
year={2012},
volume={3},
pages={648-651},
doi={10.1109/ICCSEE.2012.373},
month={March},}

@article{Roman:2013,
title = "On the features and challenges of security and privacy in distributed internet of things ",
journal = "Computer Networks ",
volume = "57",
number = "10",
pages = "2266 - 2279",
year = "2013",
note = "Towards a Science of Cyber SecuritySecurity and Identity Architecture for the Future Internet ",
issn = "1389-1286",
doi = "http://dx.doi.org/10.1016/j.comnet.2012.12.018",
author = "Rodrigo Roman and Jianying Zhou and Javier Lopez",
}

@article{Yan:2014:Trust,
title = "A survey on trust management for Internet of Things ",
journal = "Journal of Network and Computer Applications ",
volume = "42",
number = "",
pages = "120 - 134",
year = "2014",
note = "",
issn = "1084-8045",
doi = "http://dx.doi.org/10.1016/j.jnca.2014.01.014",
url = "http://www.sciencedirect.com/science/article/pii/S1084804514000575",
author = "Zheng Yan and Peng Zhang and Athanasios V. Vasilakos",
}

@ARTICLE{Yang:2015,
author={Kan Yang and Kuan Zhang and Ju Ren and Xuemin Shen},
journal={Communications Magazine, IEEE},
title={Security and privacy in mobile crowdsourcing networks: challenges and opportunities},
year={2015},
volume={53},
number={8},
pages={75-81},
doi={10.1109/MCOM.2015.7180511},
ISSN={0163-6804},
month={August},}

@INPROCEEDINGS{Kapadia:2009:opportunistic,
author={Kapadia, A. and Kotz, D. and Triandopoulos, N.},
booktitle={Communication Systems and Networks and Workshops, 2009. COMSNETS 2009. First International},
title={Opportunistic sensing: Security challenges for the new paradigm},
year={2009},
pages={1-10},
doi={10.1109/COMSNETS.2009.4808850},
month={Jan},}

@inproceedings{Kozlov:2012,
 author = {Kozlov, Denis and Veijalainen, Jari and Ali, Yasir},
 title = {Security and Privacy Threats in IoT Architectures},
 booktitle = {Proceedings of the 7th International Conference on Body Area Networks},
 series = {BodyNets '12},
 year = {2012},
 isbn = {978-1-936968-60-2},
 location = {Oslo, Norway},
 pages = {256--262},
 numpages = {7},
 publisher = {ICST (Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering)},
 address = {ICST, Brussels, Belgium, Belgium},
}

@article{Jing:2014,
year={2014},
issn={1022-0038},
journal={Wireless Networks},
volume={20},
number={8},
doi={10.1007/s11276-014-0761-7},
title={Security of the Internet of Things: perspectives and challenges},
url={http://dx.doi.org/10.1007/s11276-014-0761-7},
publisher={Springer US},
keywords={Internet of Things; Security; Heterogeneous; Wireless sensor networks; RFID sensor networks},
author={Jing, Qi and Vasilakos, AthanasiosV. and Wan, Jiafu and Lu, Jingwei and Qiu, Dechao},
pages={2481-2501},
language={English}
}

@article{Weber:2010,
title = "Internet of Things – New security and privacy challenges ",
journal = "Computer Law \& Security Review ",
volume = "26",
number = "1",
pages = "23 - 30",
year = "2010",
note = "",
issn = "0267-3649",
doi = "http://dx.doi.org/10.1016/j.clsr.2009.11.008",
url = "http://www.sciencedirect.com/science/article/pii/S0267364909001939",
author = "Rolf H. Weber",
}

repository: oikuda/phd-thesis

repo_name: oikuda/phd-thesis


text:
DESCRIPTION = "This is a program to toggle GPIO number 60 on/off at an interval of 1s"
PRIORITY = "optional"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://togglegpio60.c"
S = "${WORKDIR}"
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} togglegpio60.c -o togglegpio60
}
do_install() {
install -d ${D}${bindir}
install -m 0755 togglegpio60 ${D}${bindir}
}

inherit systemd
SYSTEMD_AUTO_ENABLE = "enable"
SYSTEMD_SERVICE_${PN} = "togglegpio60.service"

SRC_URI_append = " file://togglegpio60.service "
FILES_${PN} += "${systemd_unitdir}/system/togglegpio60.service"

do_install_append() {
  install -d ${D}/${systemd_unitdir}/system
  install -m 064 ${WORKDIR}/togglegpio60.service ${D}/${systemd_unitdir}/system
}


text:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

LINUX_VERSION ?= "4.9.51"

SRCREV = "31f8c0c3f269675085e1271c9d3f76c42e672594"

SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y \
           file://linux-rpi-4.9.y-clk.patch \
           http://xenomai.org/downloads/xenomai/stable/xenomai-3.0.8.tar.bz2;name=xeno \
           file://ipipe-core-4.9.51-arm-3-rpi.patch;apply=0 \
           file://fragment.cfg \
           "

ARM_KEEP_OABI = "0"

require recipes-kernel/linux/linux-raspberrypi.inc

SRC_URI[xeno.md5sum] = "eafe3b789651f0db9575599dffc60a19"
SRC_URI[xeno.sha256sum] = "c373261ddb8280d9d7078cdd9cd9646dfb7d70d8cd3aa9693d9148f03990d711"

PV = "${LINUX_VERSION}"

# Fixes QA Error
FILES_kernel-base += "/lib/firmware"

do_configure_prepend() {
#  cp ${THISDIR}/${PN}/defconfig ${WORKDIR}/defconfig
}

do_prepare_kernel() {
  xenomai_src="${WORKDIR}/xenomai-3.0.8/"

  ${xenomai_src}/scripts/prepare-kernel.sh --arch=arm --linux=${S} --ipipe=${WORKDIR}/ipipe-core-4.9.51-arm-3-rpi.patch --default
}

addtask prepare_kernel after do_patch before do_configure

repository: s-vincent/meta-raspberrypi-rt-sv

repo_name: s-vincent/meta-raspberrypi-rt-sv


text:
package ui

var WelcomeText = `

Welcome to version %s of Gord. Below you can see the most
important changes of the last 5 versions officially released.

[::b]THIS VERSION (2021-07-14)
	- Replies are cancelled with esc
	- Reply mentions are toggled with ctrl-r
	- Mysterious crash reported by Alyxia fixed
[::b]2021-06-17
	!! EMERGENCY RELEASE !!
		- The severity of the bug fixed here (segfaults) was enough that I think it justifies a new release.
		  Usually I would never dream about releasing at this frequency.
	- [#25] Fix random segfaulting (oops)
	- Make Gord a bit smarter about privileged intents, they're now optional for bots.
[::b]2021-06-16
	- Finally fixed the message receive in other channel empty content / crashes for good :)
[::b]2021-04-07
	- Bugfixes
[::b]2021-04-06
	- Replies
`

repository: conneath/gord

repo_name: conneath/gord


text:
package main

import (
	"encoding/hex"
	"fmt"
)

func main() {

	b, _ := hex.DecodeString("ac94e2b8f9294bb911c3e424efc593e4")
	fmt.Println(len(b))
}

repository: jmptrader/goexample

repo_name: jmptrader/goexample


text:
package index

import (
	"fmt"
	"github.com/nbvghost/dandelion/app/result"
	"github.com/nbvghost/dandelion/app/service/company"
	"github.com/nbvghost/dandelion/app/service/configuration"
	"github.com/nbvghost/dandelion/app/service/content"
	"github.com/nbvghost/dandelion/app/service/goods"
	"github.com/nbvghost/dandelion/app/service/user"
	"github.com/nbvghost/dandelion/app/service/wechat"
	"github.com/nbvghost/gweb/tool/encryption"
	"io/ioutil"
	"strconv"
	"strings"
	"time"

	"github.com/nbvghost/dandelion/app/action/index/articles"
	"github.com/nbvghost/dandelion/app/play"
	"github.com/nbvghost/dandelion/app/service/dao"
	"github.com/nbvghost/dandelion/app/util"

	"github.com/nbvghost/gweb"
)

type InterceptorMp struct {
	Organization company.OrganizationService
	Wx           wechat.WxService
}

//Execute(Session *Session,Request *http.Request)(bool,Result)
func (controller InterceptorMp) Execute(context *gweb.Context) (bool, gweb.Result) {
	/*su, re := controller.Organization.ReadOrganization(context)
	if su {
		Organization := context.Session.Attributes.Get(play.SessionOrganization).(*dao.Organization)
		wxconfig := controller.Wx.MiniWeb(Organization.ID)
		if !strings.EqualFold(wxconfig.AppID, "") && !strings.EqualFold(wxconfig.AppSecret, "") {
			//micromessenger
			UserAgent := strings.ToLower(context.Request.Header.Get("User-Agent"))
			if strings.Contains(UserAgent, "micromessenger") {

				if context.Session.Attributes.Get(play.SessionUser) == nil {

					redirect := util.GetFullPath(context.Request)
					return false, &gweb.RedirectToUrlResult{Url: "/account/wx/authorize?OID=" + strconv.Itoa(int(Organization.ID)) + "&redirect=" + redirect}
				}
			}
		}
	}
	context.Response.Header().Set("Access-Control-Allow-Origin", "*")
	return su, re*/
	return true, nil
}

type Controller struct {
	gweb.BaseController
	Content       content.ContentService
	Configuration configuration.ConfigurationService
	User          user.UserService
	Goods         goods.GoodsService
}

func (controller *Controller) Init() {
	//Index.RequestMapping = make(map[string]mvc.Function)
	//controller.Interceptors.Add(&InterceptorMp{})

	controller.AddHandler(gweb.GETMethod("index", controller.indexPage))
	controller.AddHandler(gweb.POSMethod("/content/new/article/webhook", controller.newArticleWebhookAction))
	controller.AddHandler(gweb.POSMethod("/content/new/article/post", controller.newArticlePostAction))
	controller.AddHandler(gweb.POSMethod("/configuration/list", controller.configurationListAction))
	//https://dandelion.nutsy.cc/2000/content/2000/new/article/webhook

	controller.AddHandler(gweb.GETMethod("poster/index", controller.posterIndexPage))
	controller.AddHandler(gweb.GETMethod("poster/product", controller.posterProductPage))

	articles := &articles.Controller{}
	articles.Interceptors = controller.Interceptors
	controller.AddSubController("/articles/", articles)
}
func (controller *Controller) configurationListAction(context *gweb.Context) gweb.Result {
	//company := context.Session.Attributes.Get(play.SessionOrganization).(*dao.Organization)
	var ks []uint64
	util.RequestBodyToJSON(context.Request.Body, &ks)
	list := controller.Configuration.GetConfigurations(0, ks)
	return &gweb.JsonResult{Data: (&result.ActionResult{}).SmartError(nil, "OK", list)}
}
func (controller *Controller) newArticlePostAction(context *gweb.Context) gweb.Result {
	organization := context.Session.Attributes.Get(play.SessionOrganization).(*dao.Organization)
	context.Request.ParseForm()
	__sign := context.Request.FormValue("__sign")
	/*context.Request.ParseForm()

	__dataId:=context.Request.FormValue("__dataId")
	__crawlTime:=context.Request.FormValue("__crawlTime")
	__dataVersion:=context.Request.FormValue("__dataVersion")
	__dataLatest:=context.Request.FormValue("__dataLatest")
	__sourceId:=context.Request.FormValue("__sourceId")
	__dataKey:=context.Request.FormValue("__dataKey")
	__crawlUrl:=context.Request.FormValue("__crawlUrl")*/

	msSign := encryption.Md5ByString("274455411" + "shenjianshou.cn")
	if strings.EqualFold(strings.ToUpper(__sign), msSign) {

		article_title := context.Request.FormValue("article_title")
		weixin_tmp_url := context.Request.FormValue("weixin_tmp_url")
		article_publish_time := context.Request.FormValue("article_publish_time")
		weixin_introduce := context.Request.FormValue("weixin_introduce")
		article_thumbnail := context.Request.FormValue("article_thumbnail")
		article_content := context.Request.FormValue("article_content")

		//var images []interface{}
		//article_images:=context.Request.FormValue("article_images")
		//json.Unmarshal([]byte(article_images),&images)

		weixin_nickname := context.Request.FormValue("weixin_nickname")
		//fmt.Println(article_title,weixin_tmp_url,weixin_introduce,article_thumbnail,article_content,images,weixin_nickname)

		var createTime time.Time
		ts, _ := strconv.ParseInt(article_publish_time, 10, 64)
		createTime = time.Unix(ts, 0)

		//OID,			   ContentName,ContentSubTypeName,Author,Title,          FromUrl,       Introduce,       Picture,                        Content,        CreatedAt
		controller.addArticle(organization.ID, "头条文摘", weixin_nickname, weixin_nickname, article_title, weixin_tmp_url, weixin_introduce, article_thumbnail, article_content, createTime)

		return &gweb.JsonResult{Data: map[string]interface{}{"result": 1, "data": "发布成功"}}

	} else {
		return &gweb.JsonResult{Data: map[string]interface{}{"result": 2, "reason": "发布失败, 错误原因: 发布密码验证失败"}}
	}

	//
}
func (controller *Controller) addArticle(OID uint64, ContentName string, ContentSubTypeName string, Author, Title string, FromUrl string, Introduce string, Picture string, Content string, CreatedAt time.Time) {

	controller.Content.AddSpiderContent(OID, ContentName, ContentSubTypeName, Author, Title, FromUrl, Introduce, Picture, Content, CreatedAt)

}
func (controller *Controller) newArticleWebhookAction(context *gweb.Context) gweb.Result {
	organization := context.Session.Attributes.Get(play.SessionOrganization).(*dao.Organization)

	context.Request.ParseForm()
	url := context.Request.FormValue("url")
	data := context.Request.FormValue("data")
	timestamp := context.Request.FormValue("timestamp")
	crawl_time := context.Request.FormValue("crawl_time")
	sign2 := context.Request.FormValue("sign2")
	data_key := context.Request.FormValue("data_key")
	event_type := context.Request.FormValue("event_type")

	mySign2 := encryption.Md5ByString(url + "k4Mjg3NDhmYTJlYT-a1910cf788d26ec" + timestamp)
	fmt.Println(data, crawl_time, data_key, event_type)
	fmt.Println(mySign2)
	fmt.Println(sign2)
	if strings.EqualFold(mySign2, strings.ToUpper(sign2)) {
		dataMap := make(map[string]interface{})
		util.JSONToStruct(data, &dataMap)

		//article_publish_time :=dataMap["article_publish_time"].(string)//context.Request.FormValue("article_publish_time")

		var weixin_nickname string
		var article_title string
		var weixin_tmp_url string
		var weixin_introduce string
		var article_thumbnail string
		var article_content string
		var article_publish_time string

		if dataMap["weixin_nickname"] != nil {
			weixin_nickname = dataMap["weixin_nickname"].(string)
		}
		if dataMap["article_title"] != nil {
			article_title = dataMap["article_title"].(string)
		}
		if dataMap["weixin_tmp_url"] != nil {
			weixin_tmp_url = dataMap["weixin_tmp_url"].(string)
		}
		if dataMap["weixin_introduce"] != nil {
			weixin_introduce = dataMap["weixin_introduce"].(string)
		}
		if dataMap["article_thumbnail"] != nil {
			article_thumbnail = dataMap["article_thumbnail"].(string)
		}
		if dataMap["article_content"] != nil {
			article_content = dataMap["article_content"].(string)
		}
		if dataMap["article_publish_time"] != nil {
			article_publish_time = dataMap["article_publish_time"].(string)
		}

		var createTime time.Time
		ts, _ := strconv.ParseInt(article_publish_time, 10, 64)
		createTime = time.Unix(ts, 0)

		//controller.addArticle(organization.ID,"头条文摘",weixin_nickname,weixin_nickname,article_title,weixin_tmp_url,weixin_introduce,article_thumbnail,article_content,createTime)
		controller.addArticle(organization.ID, "头条文摘", weixin_nickname, weixin_nickname, article_title, weixin_tmp_url, weixin_introduce, article_thumbnail, article_content, createTime)
		return &gweb.TextResult{Data: data_key}
	} else {
		return &gweb.TextResult{Data: ""}
	}
	b, err := ioutil.ReadAll(context.Request.Body)
	fmt.Println(err)
	fmt.Println(string(b))

	return &gweb.JsonResult{Data: &result.ActionResult{Code: result.ActionOK, Message: "", Data: nil}}
}

func (controller *Controller) defaultPage(context *gweb.Context) gweb.Result {

	return &gweb.RedirectToUrlResult{Url: "index"}
}

//6c0420c5e926a2ac8d56aa4192ab10fa
func (controller *Controller) indexPage(context *gweb.Context) gweb.Result {

	return &gweb.HTMLResult{}
}
func (controller *Controller) posterIndexPage(context *gweb.Context) gweb.Result {
	//fmt.Println(context.Request.URL.Query().Get("ID"))
	UserID, _ := strconv.ParseUint(context.Request.URL.Query().Get("UserID"), 10, 64)
	var user dao.User
	controller.User.Get(dao.Orm(), UserID, &user)
	return &gweb.HTMLResult{Params: map[string]interface{}{"User": user}}
}
func (controller *Controller) posterProductPage(context *gweb.Context) gweb.Result {
	//fmt.Println(context.Request.URL.Query().Get("ID"))
	UserID, _ := strconv.ParseUint(context.Request.URL.Query().Get("UserID"), 10, 64)
	ProductID, _ := strconv.ParseUint(context.Request.URL.Query().Get("ProductID"), 10, 64)
	var user dao.User
	controller.User.Get(dao.Orm(), UserID, &user)
	//var user dao.User
	GoodsInfo := controller.Goods.GetGoods(dao.Orm(), ProductID)
	return &gweb.HTMLResult{Params: map[string]interface{}{"User": user, "GoodsInfo": GoodsInfo}}
}

repository: rebider/dandelion

repo_name: rebider/dandelion


text:
/*
 *  Created on: 8 Jun 2015
 *      Author: Yiming Yang
 *
 * Copyright (c) 2016, University Of Edinburgh
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *  * Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *  * Neither the name of  nor the names of its contributors may be used to
 *    endorse or promote products derived from this software without specific
 *    prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 */

#include <frrt/FlexiblePlanner.h>
#include "ompl/tools/config/SelfConfig.h"
#include "ompl/base/goals/GoalSampleableRegion.h"
namespace ompl
{
  namespace geometric
  {
    FlexiblePlanner::FlexiblePlanner(const base::SpaceInformationPtr &si,
        const std::string & name)
        : base::Planner(si, name), checkCnt_(0)
    {
      specs_.approximateSolutions = true;
      specs_.directed = true;
    }

    FlexiblePlanner::~FlexiblePlanner()
    {

    }

    bool FlexiblePlanner::setUpLocalPlanner(const std::string & xml_file,
        const exotica::Scene_ptr & scene)
    {
      exotica::Initialiser ini;
      exotica::PlanningProblem_ptr prob;
      exotica::MotionSolver_ptr sol;
      ini.initialise(xml_file, ser_, sol, prob, "LocalProblem",
              "FRRTLocal");
      if (sol->type()=="exotica::IKsolver")
      {
        HIGHLIGHT_NAMED("FRRT",
            "Using local planner "<<sol->object_name_<<" at "<<sol.get());
        local_solver_ = boost::static_pointer_cast<exotica::IKsolver>(sol);
      }
      else
      {
        throw_pretty("Unknown solver type!");
      }
      local_solver_->specifyProblem(prob);
      prob->setScene(scene->getPlanningScene());

      if (prob->getTaskDefinitions().find("LocalTask")
          == prob->getTaskDefinitions().end())
      {
        ERROR("Missing XML tag of 'LocalTask'");
        return false;
      }
      local_map_ = boost::static_pointer_cast<exotica::Identity>(
          prob->getTaskMaps().at("CSpaceMap"));
      ser_->getParam(ser_->getName() + "/GlobalTau", gTau_);
      ser_->getParam(ser_->getName() + "/LocalTau", lTau_);

      return true;
    }

    bool FlexiblePlanner::resetSceneAndGoal(const exotica::Scene_ptr & scene,
        const Eigen::VectorXd & goal)
    {
      checkCnt_ = 0;
      global_goal_.setZero(goal.size());
      global_goal_ = goal;
      local_solver_->getProblem()->setScene(scene->getPlanningScene());
      return true;
    }

    bool FlexiblePlanner::localSolve(const Eigen::VectorXd & qs,
        Eigen::VectorXd & qg, Eigen::MatrixXd & solution)
    {

      int dim = (int) si_->getStateDimension();
      bool ret = local_solver_->SolveFullSolution(qs, solution);
      qg.resize(dim);
      qg = solution.row(solution.rows() - 1).transpose();
      checkCnt_ += (solution.rows() - 1);
      return ret;
    }
  }
}

repository: RiddickSky/exotica

repo_name: RiddickSky/exotica

extension: cpp


text:
// Copyright 2020 Thomas.Hoehenleitner [at] seerose.net
// Use of this source code is governed by a license that can be found in the LICENSE file.

// Package link_test is a blackbox-test.
package link_test

import (
	"testing"
)

func TestDummy(t *testing.T) {
}

repository: rokath/trice

repo_name: rokath/trice

gha_language: C


text:
require cuda-shared-binaries-${PV}.inc

SRC_URI[main.sha256sum] = "459f9e41ac458eef3c94ba0a5d367182af83c070454d9e38b3565252c039a827"
SRC_URI[dev.sha256sum] = "3a9ccd17e6916fda5cede14c206a8199fdba27f1118947a1f31cbf33132241df"

BBCLASSEXTEND = "native nativesdk"

repository: b-man/meta-tegra

repo_name: b-man/meta-tegra


text:
SUMMARY = "Console mouse driver"
DESCRIPTION = "GPM (General Purpose Mouse) is a mouse server \
for the console and xterm, with sample clients included \
(emacs, etc)."
HOMEPAGE = "https://www.nico.schottelius.org/software/gpm"
SECTION = "console/utils"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"

PV = "1.99.7+git${SRCREV}"
PR = "r2"
SRCREV = "e82d1a653ca94aa4ed12441424da6ce780b1e530"

DEPENDS = "ncurses bison-native"

SRC_URI = "git://github.com/telmich/gpm;protocol=https;branch=master \
           file://init \
           file://gpm.service.in \
           "

S = "${WORKDIR}/git"

inherit autotools-brokensep update-rc.d systemd texinfo

INITSCRIPT_NAME = "gpm"
INITSCRIPT_PARAMS = "defaults"

do_configure:prepend() {
    (cd ${S};./autogen.sh;cd -)
}

do_install:append () {
    install -d ${D}${systemd_system_unitdir}
    sed 's:@bindir@:${sbindir}:' < ${WORKDIR}/gpm.service.in >${D}${systemd_system_unitdir}/gpm.service
    install -D -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/gpm
    ln -s libgpm.so.2 ${D}${libdir}/libgpm.so
}

SYSTEMD_SERVICE:${PN} = "gpm.service"


text:
@Online {Saffo,
  title = {Strong Opinions weakly held : Paul Saffo},
  date = {2020-09-04},
  file = {:./references/02008-07-26-strong-opinions-weakly-held-.html:html},
  url = {https://www.saffo.com/02008/07/26/strong-opinions-weakly-held/},
  urldate = {2020-09-04}
}

@Online {Cedric,
  title = {‘Strong Opinions, Weakly Held’ Doesn't Work That Well},
  date = {2020-09-04},
  file = {:./references/blog-strong-opinions-weakly-held-is-bad-.html:html},
  url = {https://commoncog.com/blog/strong-opinions-weakly-held-is-bad/},
  urldate = {2020-09-04}
}

@Online {Michael,
  title = {Strong Opinions Loosely Held Might be the Worst Idea in Tech - The Glowforge Blog},
  date = {2020-09-04},
  file = {:./references/strong-opinions-loosely-held-might-be-the-worst-idea-in-tech-.html:html},
  url = {https://blog.glowforge.com/strong-opinions-loosely-held-might-be-the-worst-idea-in-tech/},
  urldate = {2020-09-04}
}

extension: bibtex


text:
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/

@misc{qassim2021improved,
      title={Improved upper bounds on the stabilizer rank of magic states},
      author={Hammam Qassim and Hakop Pashayan and David Gosset},
      year={2021},
      eprint={2106.07740},
      archivePrefix={arXiv},
      primaryClass={quant-ph}
}

@article{Bravyi_2016,
   title={Trading Classical and Quantum Computational Resources},
   volume={6},
   ISSN={2160-3308},
   url={http://dx.doi.org/10.1103/PhysRevX.6.021043},
   DOI={10.1103/physrevx.6.021043},
   number={2},
   journal={Physical Review X},
   publisher={American Physical Society (APS)},
   author={Bravyi, Sergey and Smith, Graeme and Smolin, John A.},
   year={2016},
   month={Jun}
}

@article{Bravyi_2019,
   title={Simulation of quantum circuits by low-rank stabilizer decompositions},
   volume={3},
   ISSN={2521-327X},
   url={http://dx.doi.org/10.22331/q-2019-09-02-181},
   DOI={10.22331/q-2019-09-02-181},
   journal={Quantum},
   publisher={Verein zur Forderung des Open Access Publizierens in den Quantenwissenschaften},
   author={Bravyi, Sergey and Browne, Dan and Calpin, Padraic and Campbell, Earl and Gosset, David and Howard, Mark},
   year={2019},
   month={Sep},
   pages={181}
}

repository: evilevievil/stabilizer-decomp-search

repo_name: evilevievil/stabilizer-decomp-search


text:
/*-
 *
 * Hedera Mirror Node
 *
 * Copyright (C) 2019 - 2020 Hedera Hashgraph, LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package entry

import (
	rTypes "github.com/coinbase/rosetta-sdk-go/types"
	"github.com/hashgraph/hedera-mirror-node/hedera-mirror-rosetta/app/domain/types"
	"github.com/hashgraph/hedera-mirror-node/hedera-mirror-rosetta/app/errors"
	"github.com/jinzhu/gorm"
	"log"
)

const (
	latestAddressBookEntries = `SELECT abe.* FROM address_book_entry AS abe
		                        JOIN address_book AS ab
                                ON ab.start_consensus_timestamp = abe.consensus_timestamp
                                WHERE ab.end_consensus_timestamp IS NULL`
)

const (
	tableNameAddressBookEntry = "address_book_entry"
)

type addressBookEntry struct {
	Id                 int32  `gorm:"type:integer;primary_key"`
	ConsensusTimestamp int64  `gorm:"type:bigint"`
	Ip                 string `gorm:"size:128"`
	Port               int32  `gorm:"type:integer"`
	Memo               string `gorm:"size:128"`
	PublicKey          string `gorm:"size:1024"`
	NodeId             int64  `gorm:"type:bigint"`
	NodeAccountId      int64  `gorm:"type:bigint"`
	NodeCertHash       []byte `gorm:"type:bytea"`
}

func (addressBookEntry) TableName() string {
	return tableNameAddressBookEntry
}

// AddressBookEntryRepository struct that has connection to the Database
type AddressBookEntryRepository struct {
	dbClient *gorm.DB
}

// Entries return all found Address Book Entries
func (aber *AddressBookEntryRepository) Entries() (*types.AddressBookEntries, *rTypes.Error) {
	dbEntries := aber.retrieveEntries()

	entries := make([]*types.AddressBookEntry, len(dbEntries))
	for i, e := range dbEntries {
		peerId, err := e.getPeerId()
		if err != nil {
			return nil, err
		}
		entries[i] = &types.AddressBookEntry{
			PeerId: peerId,
			Metadata: map[string]interface{}{
				"ip":   e.Ip,
				"port": e.Port,
			},
		}
	}

	return &types.AddressBookEntries{
		Entries: entries}, nil
}

func (abe *addressBookEntry) getPeerId() (*types.Account, *rTypes.Error) {
	acc, err := types.AccountFromString(abe.Memo)
	if err != nil {
		log.Printf(errors.CreateAccountDbIdFailed, abe.Memo)
		return nil, errors.Errors[errors.InternalServerError]
	}
	return acc, nil
}

func (aber *AddressBookEntryRepository) retrieveEntries() []addressBookEntry {
	var entries []addressBookEntry
	aber.dbClient.Raw(latestAddressBookEntries).Scan(&entries)
	return entries
}

// NewAddressBookEntryRepository creates an instance of a AddressBookEntryRepository struct.
func NewAddressBookEntryRepository(dbClient *gorm.DB) *AddressBookEntryRepository {
	return &AddressBookEntryRepository{
		dbClient: dbClient,
	}
}

repository: LimeChain/hedera-mirror-node

repo_name: LimeChain/hedera-mirror-node

gha_language: Java