-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ciCciC/feature/showingImageBetweenSections
Feature/showing image between sections
- Loading branch information
Showing
16 changed files
with
137 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Default ignored files | ||
.idea/*.iws | ||
.idea/*.iml | ||
.idea/*.ipr | ||
.idea/workspace.xml | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ func GetCollector() *colly.Collector { | |
colly.Async(true), | ||
) | ||
return collector | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
package controller | ||
|
||
import "github.com/gin-gonic/gin" | ||
import ( | ||
"github.com/gin-gonic/gin" | ||
) | ||
|
||
type BaseController interface { | ||
InitRoute(r *gin.Engine) | ||
} | ||
} | ||
|
||
const ( | ||
CATEGORY = "category" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package controller | ||
|
||
import ( | ||
"github.com/gin-gonic/gin" | ||
"net/http" | ||
) | ||
|
||
type CategoryController struct { | ||
BaseController | ||
} | ||
|
||
func (c CategoryController) InitRoute(r *gin.Engine) { | ||
r.GET("/categories", c.GetCategories) | ||
} | ||
|
||
func (c CategoryController) GetCategories(context *gin.Context) { | ||
context.JSON(http.StatusOK, | ||
[...] string {"games", "technology", "physics"}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package model | ||
|
||
type ArticleItem struct { | ||
PageLink string | ||
ImageLink string | ||
Topic string | ||
Title string | ||
Teaser string | ||
PageLink string `json:"pageLink"` | ||
ImageLink string `json:"imageLink"` | ||
Topic string `json:"topic"` | ||
Title string `json:"title"` | ||
Teaser string `json:"teaser"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package model | ||
|
||
type ContentBody struct { | ||
Content string `json:"content"` | ||
CType string `json:"cType"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package model | ||
|
||
type Section struct { | ||
Title string | ||
Contents []string | ||
Title string `json:"title"` | ||
//Contents []string | ||
Contents []ContentBody `json:"contentBody"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package model | ||
|
||
type TestModel struct { | ||
TestA | ||
TestB | ||
TestExtendsAnimal | ||
TestExtendsVehicle | ||
} | ||
|
||
type TestExtendsAnimal struct { | ||
Name string | ||
} | ||
|
||
type TestExtendsVehicle struct { | ||
Price int | ||
} | ||
|
||
type TestA interface { | ||
TestAA() string | ||
} | ||
|
||
type TestB interface { | ||
TestBB() string | ||
} | ||
|
||
func (t TestModel) TestAA() string { | ||
return "TestModel TestAA" | ||
} | ||
|
||
func (t TestModel) TestBB() string { | ||
return "TestModel TestBB" | ||
} | ||
|
||
func (t TestModel) UseBothExtends() string { | ||
t.TestExtendsVehicle.Price = 125 | ||
t.TestExtendsAnimal.Name = "Insane Tiger" | ||
return "Extends: TestExtendsVehicle and TestExtendsAnimal" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters